From: nhmall Date: Fri, 17 Feb 2023 21:56:27 +0000 (-0500) Subject: fix a warning on Linux for X11 if -std=c99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d1fda1773a2193fd2c3aa1bff8704ef503f1419e;p=nethack fix a warning on Linux for X11 if -std=c99 --- diff --git a/win/X11/winX.c b/win/X11/winX.c index 9ee92a123..c7450c28d 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -16,6 +16,14 @@ #define SHORT_FILENAMES #endif +/* Can't use #ifdef LINUX because no header files have been processed yet. + * This is needed to ensure the prototype for seteuid() is picked up when + * the header files are processed. + */ +#ifdef __linux__ +#define _POSIX_C_SOURCE 200809 +#endif + #include #include #include