-
Notifications
You must be signed in to change notification settings - Fork 833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if it has been defined before defining _GNU_SOURCE #7958
Conversation
Can one of the admins verify this patch? |
Okay to test. Contributor agreement in progress. |
Retest this please:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not merge until contributor agreement has been approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the problem this addresses is when a system header defines _GNU_SOURCE
to 1
, then this is undone by the code in bio.c
and ssl.c
. Seems like a good fix.
I'd like to see the #undef _GNU_SOURCE
clauses removed from inside the conditions, now that the outer gates have made them frivolous.
@@ -24,7 +24,7 @@ | |||
#endif | |||
|
|||
#include <wolfssl/wolfcrypt/settings.h> | |||
#if defined(OPENSSL_EXTRA) && !defined(_WIN32) | |||
#if defined(OPENSSL_EXTRA) && !defined(_WIN32) && !defined(_GNU_SOURCE) | |||
/* turn on GNU extensions for XVASPRINTF with wolfSSL_BIO_printf */ | |||
#undef _GNU_SOURCE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this now that it's frivolous
@@ -25,7 +25,7 @@ | |||
#endif | |||
|
|||
#include <wolfssl/wolfcrypt/settings.h> | |||
#if defined(OPENSSL_EXTRA) && !defined(_WIN32) | |||
#if defined(OPENSSL_EXTRA) && !defined(_WIN32) && !defined(_GNU_SOURCE) | |||
/* turn on GNU extensions for XISASCII */ | |||
#undef _GNU_SOURCE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
superseded by #7971 |
Description
Do a check for the
_GNU_SOURCE
macro before defining it.Fixes #7957
Testing
Tested by building WolfSSL 5.7.2 against Netatalk.
Checklist
N/A