Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140857 - x11-plugins/wmpasman-0.8.4.1 fails to compile (exit undeclared)
Summary: x11-plugins/wmpasman-0.8.4.1 fails to compile (exit undeclared)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Dockapp Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-17 18:21 UTC by Denilson Sá Maia
Modified: 2006-07-18 01:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denilson Sá Maia 2006-07-17 18:21:24 UTC
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).
Comment 1 Denilson Sá Maia 2006-07-17 18:32:13 UTC
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
}
Comment 2 Michele Noberasco (RETIRED) gentoo-dev 2006-07-18 01:57:30 UTC
Fixed. Thanks for the submission (and the fix)!