Merge pull request #3735 from gilles-peskine-arm/entropy_poll-_gnu_source-2.16

Backport 2.16: Don't redefine _GNU_SOURCE if it's already defined
This commit is contained in:
Gilles Peskine 2020-10-05 17:25:29 +02:00 committed by GitHub
commit 2f26bf7e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1,3 @@
Bugfix
* Fix the build when the macro _GNU_SOURCE is defined to a non-empty value.
Fix #3432.

View File

@ -44,7 +44,7 @@
* **********
*/
#if defined(__linux__)
#if defined(__linux__) && !defined(_GNU_SOURCE)
/* Ensure that syscall() is available even when compiling with -std=c99 */
#define _GNU_SOURCE
#endif