diff options
author | Patrick Steinhardt | 2018-04-10 14:36:31 +0200 |
---|---|---|
committer | Karel Zak | 2018-04-11 13:04:53 +0200 |
commit | cc6ab5efb13453cc8b5660ab268992e4861c73a7 (patch) | |
tree | 46bbb9f6810b39473a73e81f720de0e0a8408c2c /disk-utils | |
parent | setpriv: implement option to set parent death signal (diff) | |
download | kernel-qcow2-util-linux-cc6ab5efb13453cc8b5660ab268992e4861c73a7.tar.gz kernel-qcow2-util-linux-cc6ab5efb13453cc8b5660ab268992e4861c73a7.tar.xz kernel-qcow2-util-linux-cc6ab5efb13453cc8b5660ab268992e4861c73a7.zip |
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>
Diffstat (limited to 'disk-utils')
-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 806bff837..8f590387f 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) |