Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

build fails [3] #7

rofl0r opened this Issue Jul 9, 2012 · 2 comments


None yet
2 participants

rofl0r commented Jul 9, 2012

gcc -Wall -Wextra -Werror -pedantic -std=gnu99 -fsigned-char -g genkeymap.c -o genkeymap
genkeymap.c: In function 'main':
genkeymap.c:44:5: error: implicit declaration of function 'strdup'
cc1: warnings being treated as errors
genkeymap.c:44:14: error: incompatible implicit declaration of built-in function 'strdup'
genkeymap.c:52:6: error: 'off_t' undeclared (first use in this function)
genkeymap.c:52:6: note: each undeclared identifier is reported only once for each function it appears in
genkeymap.c:52:12: error: expected ';' before 'o'
genkeymap.c:53:9: error: 'o' undeclared (first use in this function)
make: *** [genkeymap] Error 1

maybe you wanted to assume -D_GNU_SOURCE in that file ?

using it in CFLAGS errors soon enough:

gcc -c -Wall -Wextra -Werror -pedantic -std=gnu99 -fsigned-char -D_GNU_SOURCE -g ttyesc.c -o ttyesc.o
cc1: warnings being treated as errors
In file included from input.h:46:0,
from buffer.h:24,
from names.h:36,
from config.h:37,
from bits.h:16,
from ttyesc.h:15,
from ttyesc.c:9:
irc.h:11:0: error: "_GNU_SOURCE" redefined
:0:0: note: this is the location of the previous definition
make: *** [ttyesc.o] Error 1

if you are using such pedantic Werror flags, you should


define _GNU_SOURCE

so that it doesnt clash with command line

rofl0r commented Jul 9, 2012

btw, this is using musl libc

@ghost ghost assigned ec429 Jul 9, 2012


ec429 commented Jul 9, 2012

3b69162 should fix this. (I've taken the lazy approach, of just putting it in CFLAGS only, rather than doing things properly and #ifndef #defining _GNU_SOURCE in the specific files that need it)

@ec429 ec429 closed this Jul 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment