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