summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Koutcher <thomas.koutcher@online.fr>2023-02-04 12:43:59 +0100
committerThomas Koutcher <thomas.koutcher@online.fr>2023-02-04 12:43:59 +0100
commit6da79c245c6637cc9e1b07a4c56e7c268ee28d11 (patch)
tree5459dfecf1629a411e6b424faaf50cf096a39653
parentb834b51d61247406b611163a3d470de0bd63a521 (diff)
Fix warning introduced by #1255
Fixes #1259
-rw-r--r--include/tig/tig.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/tig/tig.h b/include/tig/tig.h
index 28850e25..2b0bc53d 100644
--- a/include/tig/tig.h
+++ b/include/tig/tig.h
@@ -19,8 +19,14 @@
#endif
/* required for struct timezone */
-#define _BSD_SOURCE
-#define _DEFAULT_SOURCE
+#ifdef _BSD_SOURCE
+#undef _BSD_SOURCE
+#endif
+#define _BSD_SOURCE 1
+#ifdef _DEFAULT_SOURCE
+#undef _DEFAULT_SOURCE
+#endif
+#define _DEFAULT_SOURCE 1
#include "compat/compat.h"
@@ -82,6 +88,9 @@
#endif
/* ncurses(3): Must be defined to have extended wide-character functions. */
+#ifdef _XOPEN_SOURCE_EXTENDED
+#undef _XOPEN_SOURCE_EXTENDED
+#endif
#define _XOPEN_SOURCE_EXTENDED 1
#if defined HAVE_NCURSESW_CURSES_H