summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib/getsockopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/lib/getsockopt.c')
-rw-r--r--mdk-stage1/dietlibc/lib/getsockopt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/lib/getsockopt.c b/mdk-stage1/dietlibc/lib/getsockopt.c
new file mode 100644
index 000000000..8c0a57557
--- /dev/null
+++ b/mdk-stage1/dietlibc/lib/getsockopt.c
@@ -0,0 +1,13 @@
+#include <linux/net.h>
+
+extern int socketcall(int callno,long* args);
+
+int getsockopt(int a, int b, int c, void *d, int e) {
+#ifdef __i386__
+ return socketcall(SYS_GETSOCKOPT, (long*)&a);
+#else
+ unsigned long args[] = { a, b, c, (long)d, e };
+ return socketcall(SYS_GETSOCKOPT, args);
+#endif
+}
+