]> granicus.if.org Git - nethack/commitdiff
fix a warning on Linux for X11 if -std=c99
authornhmall <nhmall@nethack.org>
Fri, 17 Feb 2023 21:56:27 +0000 (16:56 -0500)
committernhmall <nhmall@nethack.org>
Fri, 17 Feb 2023 21:56:27 +0000 (16:56 -0500)
win/X11/winX.c

index 9ee92a123a72db522b3283cb3ccf2564722f0216..c7450c28d0655ea9bb627dd8dfb5ff94ac3c0651 100644 (file)
 #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 <X11/Intrinsic.h>
 #include <X11/StringDefs.h>
 #include <X11/Shell.h>