This is the error message (tell me if you need something else): i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -O2 -pipe -march=i686 -mtune=pentium3 -fomit-frame-pointer -Wall -D_GNU_SOURCE -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -c `test -f 'wmgeneral-gtk.c' || echo './'`wmgeneral-gtk.c wmgeneral-gtk.c: In function `openDockWindow': wmgeneral-gtk.c:186: warning: implicit declaration of function `exit' wmgeneral-gtk.c:200: error: `exit' undeclared (first use in this function) wmgeneral-gtk.c:200: error: (Each undeclared identifier is reported only once wmgeneral-gtk.c:200: error: for each function it appears in.) wmgeneral-gtk.c:206: warning: implicit declaration of function `exit' make[2]: *** [wmgeneral-gtk.o] Error 1 make[2]: Leaving directory `/gentoo/tmp_portage/portage/wmpasman-0.8.4.1/work/wmpasman-0.8.4.1/wmgeneral' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/gentoo/tmp_portage/portage/wmpasman-0.8.4.1/work/wmpasman-0.8.4.1' make: *** [all] Error 2 !!! ERROR: x11-plugins/wmpasman-0.8.4.1 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile ebuild.sh, line 609: Called die I guess the fix would be one-line (just add #include <stdlib.h> to wmgeneral-gtk.c).
Just add the following code to ebuild, and it will compile without a problem: src_unpack() { unpack ${A} cd ${S} # Solves compile error about undefined exit - Bug 140857 sed -i -e '/#include <stdio.h>/ { p ; s/stdio/stdlib/ }' wmgeneral/wmgeneral-gtk.c }
Fixed. Thanks for the submission (and the fix)!