summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 4e936e2..7240739 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -7650,6 +7650,10 @@ PyInit__socket(void)
PyModule_AddIntMacro(m, MSG_EOR);
#endif
#ifdef MSG_TRUNC
+ // workaround for https://github.com/WebAssembly/wasi-libc/issues/305
+ #if defined(__wasi__) && !defined(__WASI_RIFLAGS_RECV_DATA_TRUNCATED)
+ # define __WASI_RIFLAGS_RECV_DATA_TRUNCATED 2
+ #endif
PyModule_AddIntMacro(m, MSG_TRUNC);
#endif
#ifdef MSG_CTRUNC