From 08b5fc8231148e788040cceccfce9968acdb5c5b Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 24 Aug 2017 17:54:59 +0530 Subject: [PATCH] Fix build failure --- nnn.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nnn.c b/nnn.c index 6f180197..8a7bc98c 100644 --- a/nnn.c +++ b/nnn.c @@ -17,6 +17,15 @@ #include #include +#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 #include #include @@ -39,7 +48,6 @@ #include #include #include - #ifndef __USE_XOPEN_EXTENDED #define __USE_XOPEN_EXTENDED 1 #endif