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