Defining __USE_XOPEN_EXTENDED was the wrong thing. Instead, define
[openssl.git] / crypto / engine / enginetest.c
index 6f18ebd9623272cecb31070d47db34866e85c3fc..59afe8e3c403a18358c0b79786994386df89f936 100644 (file)
 
 #include <stdio.h>
 #include <openssl/e_os2.h>
+/* The following defines enable the declaration of strdup(), which is an
+   extended function according to X/Open. */
 #ifdef OPENSSL_SYS_VMS_DECC
 # define _XOPEN_SOURCE_EXTENDED
 #endif
+#ifdef OPENSSL_SYS_UNIX
+# define _XOPEN_SOURCE
+# define _XOPEN_SOURCE_EXTENDED        /* For Linux and probably anything GNU */
+#endif
 #include <string.h>
 #include <openssl/engine.h>
 #include <openssl/err.h>