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:
Sean McBride 2022-10-26 14:56:51 -04:00
parent 417f46b895
commit 087e0327e8

View file

@ -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