summaryrefslogtreecommitdiff
path: root/lang/modula-3-socks/files/accept.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lang/modula-3-socks/files/accept.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lang/modula-3-socks/files/accept.c b/lang/modula-3-socks/files/accept.c
new file mode 100644
index 000000000000..89f955d78d28
--- /dev/null
+++ b/lang/modula-3-socks/files/accept.c
@@ -0,0 +1,16 @@
+#include "wrap.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int
+m3_accept(int s, struct sockaddr *addr, int *addrlen)
+{
+ int result;
+
+ ENTER_CRITICAL;
+ MAKE_WRITABLE(addr);
+ MAKE_WRITABLE(addrlen);
+ result = accept(s, addr, addrlen);
+ EXIT_CRITICAL;
+ return result;
+}