joelburget / slimlock

SLiM + slock = slimlock
GNU General Public License v2.0
40 stars 17 forks source link

MIssing headers #17

Closed oahong closed 12 years ago

oahong commented 12 years ago

Hi, I was trying to compile slimlock with gcc 4.7, but got the following error message:

$ make g++ -Wall -I. -I/usr/include/freetype2 -pthread -DPACKAGE=\"slimlock\" -DVERSION=\"0.11\" -DPKGDATADIR=\"/usr/share/slim\" -DSYSCONFDIR=\"/etc\" -c cfg.cpp -o cfg.o g++ -Wall -I. -I/usr/include/freetype2 -pthread -DPACKAGE=\"slimlock\" -DVERSION=\"0.11\" -DPKGDATADIR=\"/usr/share/slim\" -DSYSCONFDIR=\"/etc\" -c image.cpp -o image.o g++ -Wall -I. -I/usr/include/freetype2 -pthread -DPACKAGE=\"slimlock\" -DVERSION=\"0.11\" -DPKGDATADIR=\"/usr/share/slim\" -DSYSCONFDIR=\"/etc\" -c panel.cpp -o panel.o panel.cpp: In member function ‘void Panel::WrongPassword(int)’: panel.cpp:219:18: error: ‘sleep’ was not declared in this scope make: *\ [panel.o] Error 1

make g++ -Wall -I. -I/usr/include/freetype2 -pthread -DPACKAGE=\"slimlock\" -DVERSION=\"0.11\" -DPKGDATADIR=\"/usr/share/slim\" -DSYSCONFDIR=\"/etc\" -c panel.cpp -o panel.o g++ -Wall -I. -I/usr/include/freetype2 -pthread -DPACKAGE=\"slimlock\" -DVERSION=\"0.11\" -DPKGDATADIR=\"/usr/share/slim\" -DSYSCONFDIR=\"/etc\" -c slimlock.cpp -o slimlock.o slimlock.cpp: In function ‘int main(int, char)’: slimlock.cpp:164:20: error: ‘usleep’ was not declared in this scope slimlock.cpp:244:20: error: ‘close’ was not declared in this scope slimlock.cpp: In function ‘void HandleSignal(int)’: slimlock.cpp:350:15: error: ‘close’ was not declared in this scope slimlock.cpp: In function ‘void RaiseWindow(void_)’: slimlock.cpp:361:16: error: ‘sleep’ was not declared in this scope slimlock.cpp:363:1: warning: no return statement in function returning non-void [-Wreturn-type] make: _* [slimlock.o] Error 1

please review my patch. Thanks

titanofold commented 12 years ago

Well, I was about to make this very pull request. I have users that confirm this fix on Gentoo.

joelburget commented 12 years ago

Looks good to me, sorry it took to get around to this.