From: Patrick Steinhardt Date: Tue, 10 Apr 2018 12:36:31 +0000 (+0100) Subject: cfdisk: fix missing prototype for `get_wch` X-Git-Tag: v2.33-rc1~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc6ab5efb13453cc8b5660ab268992e4861c73a7;p=thirdparty%2Futil-linux.git cfdisk: fix missing prototype for `get_wch` The header 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 --- diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index 806bff8370..8f590387fd 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -33,6 +33,10 @@ # include #endif +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 500 /* for inclusion of get_wch */ +#endif + #ifdef HAVE_SLCURSES_H # include #elif defined(HAVE_SLANG_SLCURSES_H)