diff options
author | Patrick Steinhardt <ps@pks.im> | 2018-04-10 13:36:31 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2018-07-11 16:04:38 +0200 |
commit | 366545e745de2a7391dadf1e9f65993efe7a80af (patch) | |
tree | 275da8c45e701b6976f0e4c42d417670acf54542 | |
parent | 58b2bb661d494cc22023dfac84a39f3cfba1ac54 (diff) | |
download | util-linux-366545e745de2a7391dadf1e9f65993efe7a80af.tar.gz |
cfdisk: fix missing prototype for `get_wch`
The header <ncursesw/ncurses.h> defines the get_wch(3) function only
when `NCURSES_WIDECHAR` is defined. This define is actually getting set
in the same header file, but only in case `_XOPEN_SOURCE` is defined and
has a value of 500 or higher. As we already have the precedence of
defining `_XOPEN_SOURCE` to a value of 600 in some other files, simply
define it to the minimum required value of 500 in "cfdisk.c". This
silences a warning for `get_wch` being unknown.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
-rw-r--r-- | disk-utils/cfdisk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index 221e72716..13c8a62df 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -33,6 +33,10 @@ # include <slang/slang.h> #endif +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 500 /* for inclusion of get_wch */ +#endif + #ifdef HAVE_SLCURSES_H # include <slcurses.h> #elif defined(HAVE_SLANG_SLCURSES_H) |