openSUSE 12.2 build error

openSUSE 12.2 build error

Postby jchristopherlittle » 14 Jan 2013, 19:50

KeepassX 0.4.3 fails to build on openSUSE 12.2 with the following:

clittle@linux-rum6:~/src/keepassx-0.4.3> make
cd src/ && make -f Makefile
make[1]: Entering directory `/home/clittle/src/keepassx-0.4.3/src'
g++ -c -include ../build/keepassx -m64 -pipe -O2 -Wall -W -D_REENTRANT -DAUTOTYPE -DGLOBAL_AUTOTYPE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include -I. -Ilib -Icrypto -Iplugins/interfaces -Iexport -Iimport -Idialogs -I../build/ui -I../build/moc -o ../build/random.o lib/random.cpp
lib/random.cpp: In function ‘void initStdRand()’:
lib/random.cpp:98:19: error: ‘getpid’ was not declared in this scope
make[1]: *** [../build/random.o] Error 1
make[1]: Leaving directory `/home/clittle/src/keepassx-0.4.3/src'
make: *** [sub-src-make_default] Error 2

unistd.h is no longer included in some header files

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50423

Here is the patch:

--- keepassx-0.4.3/src/lib/random.cpp 2013-01-14 11:40:16.989208324 -0600
+++ keepassx-0.4.3-cl/src/lib/random.cpp 2013-01-14 11:34:50.605939960 -0600
@@ -19,6 +19,7 @@
***************************************************************************/

#include "random.h"
+#include <unistd.h>

#if defined(Q_WS_X11) || defined(Q_WS_MAC)
#include <QFile>
jchristopherlittle
KPX user
 
Posts: 1
Joined: 14 Jan 2013, 19:47
Full Name: J. Christopher Little

Re: openSUSE 12.2 build error

Postby woko » 07 Oct 2013, 18:07

Thanks, it solved the problem.
woko
KPX user
 
Posts: 2
Joined: 07 Oct 2013, 18:06
Full Name: Wok


Return to KeePassX under Linux

Who is online

Users browsing this forum: No registered users and 1 guest