1.0.42.14: socket-connect thread safety, version 2
[sbcl.git] / tools-for-build / os-provides-getprotoby-r-test.c
diff --git a/tools-for-build/os-provides-getprotoby-r-test.c b/tools-for-build/os-provides-getprotoby-r-test.c
new file mode 100644 (file)
index 0000000..b09f0e4
--- /dev/null
@@ -0,0 +1,16 @@
+/* test to build and run so that we know if we have getprotobyname_r
+ * and getprotobynumber_r */
+
+#include <netdb.h>
+
+#define BUFSIZE 1024
+
+int main ()
+{
+    struct protoent result_buf;
+    struct protoent *result;
+    char buf[BUFSIZE];
+    getprotobyname_r("", &result_buf, buf, BUFSIZE, &result);
+    getprotobynumber_r("", &result_buf, buf, BUFSIZE, &result);
+    return 104;
+}