aboutsummaryrefslogtreecommitdiffstats
path: root/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-08-24 17:54:59 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-08-24 19:13:00 +0530
commit08b5fc8231148e788040cceccfce9968acdb5c5b (patch)
treede53affddab34c28a88357269a20ad6af2f810ba /nnn.c
parent2f40eb5efc38d17596bb7566034f34765da18e79 (diff)
downloadnnn-08b5fc8231148e788040cceccfce9968acdb5c5b.tar.gz
Fix build failure
Diffstat (limited to 'nnn.c')
-rw-r--r--nnn.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/nnn.c b/nnn.c
index 6f18019..8a7bc98 100644
--- a/nnn.c
+++ b/nnn.c
@@ -17,6 +17,15 @@
#include <sys/wait.h>
#include <ctype.h>
+#ifdef __linux__ /* Fix failure due to mvaddnwstr() */
+#ifndef NCURSES_WIDECHAR
+#define NCURSES_WIDECHAR 1
+#endif
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
+#ifndef _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_SOURCE_EXTENDED
+#endif
+#endif
#include <curses.h>
#include <dirent.h>
#include <errno.h>
@@ -39,7 +48,6 @@
#include <unistd.h>
#include <wchar.h>
#include <readline/readline.h>
-
#ifndef __USE_XOPEN_EXTENDED
#define __USE_XOPEN_EXTENDED 1
#endif