summaryrefslogtreecommitdiff
path: root/tests/x509dn.c
diff options
context:
space:
mode:
authorAdam Sampson <ats@offog.org>2013-07-17 13:44:03 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-07-17 21:39:02 +0200
commit260f8de38d622af49d8077996ccc61f640eaebe8 (patch)
treec1cd7c1fb006f83a9b1db11aec2d8869d1a44187 /tests/x509dn.c
parent147b72a1c1fc74f871194ac24a6b8635d4289849 (diff)
downloadgnutls-260f8de38d622af49d8077996ccc61f640eaebe8.tar.gz
Disable tests that use socketpair on _WIN32.
socketpair isn't provided on Windows, so these tests should just exit 77. Note that resume-dtls.c already had a guard like this -- I've rewritten it to match the others, but socketpair (presumably!) isn't the only reason that test is disabled on Win32. Signed-off-by: Adam Sampson <ats@offog.org>
Diffstat (limited to 'tests/x509dn.c')
-rw-r--r--tests/x509dn.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/x509dn.c b/tests/x509dn.c
index af410838b3..1ecc51941e 100644
--- a/tests/x509dn.c
+++ b/tests/x509dn.c
@@ -29,6 +29,18 @@
#include <stdio.h>
#include <stdlib.h>
+
+#if defined(_WIN32)
+
+/* socketpair isn't supported on Win32. */
+int
+main (int argc, char** argv)
+{
+ exit (77);
+}
+
+#else
+
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -507,3 +519,5 @@ doit (void)
else
client (sockets[1]);
}
+
+#endif /* _WIN32 */