about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Modules/curses.c2
-rw-r--r--Src/system.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index 0e5e7e1f1..4f5cbd80b 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -27,7 +27,7 @@
  *
  */
 
-#define _XOPEN_SOURCE_EXTENDED 1
+#define ZSH_CURSES_SOURCE 1
 
 #include "curses.mdh"
 #include "curses.pro"
diff --git a/Src/system.h b/Src/system.h
index 2d89ac80e..34b06c583 100644
--- a/Src/system.h
+++ b/Src/system.h
@@ -52,6 +52,10 @@
 # undef HAVE_SYS_UTSNAME_H
 #endif
 
+#if defined(ZSH_CURSES_SOURCE) && defined(ZSH_CURSES_NEEDS_XOPEN)
+#define _XOPEN_SOURCE_EXTENDED 1
+#endif
+
 /*
  * Solaris by default zeroes all elements of the tm structure in
  * strptime().  Unfortunately that gives us no way of telling whether