From: Dr. Stephen Henson Date: Wed, 13 May 2009 11:32:24 +0000 (+0000) Subject: PR: 1924 X-Git-Tag: OpenSSL_1_0_0-beta3~92 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=756d2074b8cda816f9dc8fb72b35a0ff16de18ba;ds=sidebyside PR: 1924 Submitted by: "Green, Paul" Approved by: steve@openssl.org Fix _POSIX_C_SOURCE usage. --- diff --git a/apps/apps.c b/apps/apps.c index b04bfbd3c3..b992a04ba6 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -109,10 +109,12 @@ * */ +#ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 2 /* On VMS, you need to define this to get the declaration of fileno(). The value 2 is to make sure no function defined in POSIX-2 is left undefined. */ +#endif #include #include #include diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c index 1c2dcc406e..99304394c3 100644 --- a/crypto/ui/ui_openssl.c +++ b/crypto/ui/ui_openssl.c @@ -122,7 +122,9 @@ * sigaction and fileno included. -pedantic would be more appropriate for * the intended purposes, but we can't prevent users from adding -ansi. */ -#define _POSIX_C_SOURCE 1 +#ifndef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 2 +#endif #include #include #include