summaryrefslogtreecommitdiffstats
path: root/call/menu.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-07-27 19:04:18 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-07-27 19:04:18 +0200
commite6bbd14a934c572793afdd434f6e514fb33471d3 (patch)
tree52cfdcce1cbb24e5fd59e54ae7b0e187492ecfb4 /call/menu.c
parentbe52635f543d1b2540bf30e27f7561c441a1974e (diff)
call: Fix structure mismatch
GCC with LTO enabled warn: /bin/sh ../libtool --tag=CC --mode=link gcc -O2 -Wall -flto -o call call.o menu.o crc.o yapp.o dostime.o -lncursesw -lax25 libtool: link: gcc -O2 -Wall -flto -o call call.o menu.o crc.o yapp.o dostime.o -lncursesw -lax25 menu.h:22:9: warning: type of 'winopen' does not match original declaration [-Wlto-type-mismatch] WINDOW* winopen(wint*, int, int, int, int, int); ^ menu.c:20:9: note: 'winopen' was previously declared here WINDOW *winopen(wint * wtab, int nlines, int ncols, int begin_y, ^ menu.c:20:9: note: code may be misoptimized unless -fno-strict-aliasing is used This was caused by different .c files being built with different libc feature selection macros. Adding #define _DEFAULT_SOURCE #define _XOPEN_SOURCE #define _XOPEN_SOURCE_EXTENDED to menu.c would have been sufficient but it seems good practice to add the same definition to all .c files. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'call/menu.c')
-rw-r--r--call/menu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/call/menu.c b/call/menu.c
index 7de66b4..05ea00b 100644
--- a/call/menu.c
+++ b/call/menu.c
@@ -5,6 +5,9 @@
* 22.07.1995 wininfo->wint (vector->single chain) Alexander Tietzel (DG6XA)
* 25.07.1995 some minor changes Alexander Tietzel (DG6XA)
*/
+#define _DEFAULT_SOURCE
+#define _XOPEN_SOURCE
+#define _XOPEN_SOURCE_EXTENDED
#include <curses.h>
#include <stdlib.h>