summaryrefslogtreecommitdiff
path: root/lang/modula-3-socks/files/send.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lang/modula-3-socks/files/send.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lang/modula-3-socks/files/send.c b/lang/modula-3-socks/files/send.c
new file mode 100644
index 000000000000..20608ab0d402
--- /dev/null
+++ b/lang/modula-3-socks/files/send.c
@@ -0,0 +1,15 @@
+#include "wrap.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+ssize_t
+m3_send(int s, const void *msg, size_t len, int flags)
+{
+ int result;
+
+ ENTER_CRITICAL;
+ MAKE_READABLE(msg);
+ result = send(s, msg, len, flags);
+ EXIT_CRITICAL;
+ return result;
+}