[PATCH] look for getloadavg in sys/loadavg.h

Michael Ritzert kde at ritzert.de
Fri Mar 25 13:48:49 GMT 2005


Hi all,

this is the second patch I required to compile kdelibs and kdebase on
Solaris 10 i386.
It causes configure to look for <sys/loadavg.h> and includes it in
kasloaditem.cpp when found. This is required because Solaris has the
declaration of getloadavg in that header.

Ok to commit?

Michael

-------------- next part --------------
Index: kicker/extensions/kasbar/kasloaditem.cpp
===================================================================
RCS file: /home/kde/kdebase/kicker/extensions/kasbar/kasloaditem.cpp,v
retrieving revision 1.4
diff -u -3 -p -r1.4 kasloaditem.cpp
--- kicker/extensions/kasbar/kasloaditem.cpp	5 Dec 2004 01:22:53 -0000	1.4
+++ kicker/extensions/kasbar/kasloaditem.cpp	25 Mar 2005 13:43:40 -0000
@@ -1,6 +1,11 @@
 #include <math.h>
 #include <stdlib.h>
 
+#include "config.h"
+#ifdef HAVE_SYS_LOADAVG_H
+#include <sys/loadavg.h>
+#endif
+
 #include <qpainter.h>
 #include <qbitmap.h>
 #include <qdatetime.h>
Index: configure.in.in
===================================================================
RCS file: /home/kde/kdebase/configure.in.in,v
retrieving revision 1.66
diff -u -3 -p -r1.66 configure.in.in
--- configure.in.in	7 Feb 2005 12:27:53 -0000	1.66
+++ configure.in.in	25 Mar 2005 13:43:40 -0000
@@ -18,7 +18,7 @@ AC_CHECK_HEADERS(sys/time.h crypt.h \
 	sys/m_wait.h ncurses.h paths.h login_cap.h syslog.h \
 	sys/wait.h sys/ucred.h sys/mount.h floatingpoint.h fstab.h mntent.h \
 	Alib.h libutil.h util.h time.h limits.h vfork.h string.h float.h \
-	math.h nan.h ieeefp.h
+	math.h nan.h ieeefp.h sys/loadavg.h
 )
 AC_CHECK_HEADER(pty.h)
 AC_CHECK_FUNC(ptsname,,)


More information about the kde-core-devel mailing list