nnn.c | 10 +++++++++- diff --git a/nnn.c b/nnn.c index 6f180197739973753079d90a47f611de7a9d8f7f..8a7bc98cbf8c5adf1d5c457a53257d4e558bbc92 100644 --- a/nnn.c +++ b/nnn.c @@ -17,6 +17,15 @@ #endif #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 #include - #ifndef __USE_XOPEN_EXTENDED #define __USE_XOPEN_EXTENDED 1 #endif