mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-07 22:19:12 +00:00
Partly fixed a clang -Wreserved-id-macro warning with _GNU_SOURCE
_GNU_SOURCE is only defined for the syscall() function, so only define it if HAVE_SYSCALL_GETRANDOM is also defined. This fixes the only remaining -Wreserved-id-macro, at least for many cases (like macOS, Windows, and BSD).
This commit is contained in:
parent
417f46b895
commit
087e0327e8
1 changed files with 4 additions and 2 deletions
|
@ -61,8 +61,10 @@
|
|||
|
||||
#include <expat_config.h>
|
||||
|
||||
#if ! defined(_GNU_SOURCE)
|
||||
# define _GNU_SOURCE 1 /* syscall prototype */
|
||||
#if defined(HAVE_SYSCALL_GETRANDOM)
|
||||
# if ! defined(_GNU_SOURCE)
|
||||
# define _GNU_SOURCE 1 /* syscall prototype */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
Loading…
Add table
Reference in a new issue