summaryrefslogtreecommitdiffstats
path: root/usr/klibc/tests/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/tests/socket.c')
-rw-r--r--usr/klibc/tests/socket.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/usr/klibc/tests/socket.c b/usr/klibc/tests/socket.c
new file mode 100644
index 0000000..48814f9
--- /dev/null
+++ b/usr/klibc/tests/socket.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/socket.h>
+
+int main(int argc, char *argv[])
+{
+ int ret;
+
+ ret = socket(AF_INET, SOCK_DGRAM, 0);
+ if (ret == -1) {
+ fprintf(stderr, "klibc: socket(AF_INET): %s\n",
+ strerror(errno));
+ return 1;
+ }
+
+ return 0;
+}