Bug 145624 - Compile error on Solaris 8 - kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp uses setenv which is not available on Solaris
Summary: Compile error on Solaris 8 - kdebase/runtime/kurifilter-plugins/tests/kurifil...
Status: RESOLVED FIXED
Alias: None
Product: kcontrol
Classification: Miscellaneous
Component: kcmkurifilt (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Dawit Alemayehu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-18 12:10 UTC by Steve Evans
Modified: 2007-08-01 00:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Include <kdefakes.h> so setenv is defined on Solaris (439 bytes, patch)
2007-05-18 12:10 UTC, Steve Evans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Evans 2007-05-18 12:10:16 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.4.6 
OS:                Solaris

I get this compile error on kdebase on Solaris

[ 16%] Building CXX object runtime/kurifilter-plugins/tests/CMakeFiles/kurifiltertest.dir/kurifiltertest.o
In file included from /cad4/stevee/kde-svn/kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp:32:
/cad4/stevee/kde-svn/kdebase/kde-build/config.h:118:1: warning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/iso/string_iso.h:31,
                 from /usr/include/string.h:18,
                 from /opt/qt/include/QtCore/qbytearray.h:30,
                 from /opt/qt/include/QtCore/qstring.h:28,
                 from /opt/qt/include/QtCore/qtextcodec.h:27,
                 from /opt/qt/include/QtCore/QtCore:1,
                 from /opt/qt/include/QtTest/QtTest:1,
                 from /opt/kde/include/qtest_kde.h:22,
                 from /cad4/stevee/kde-svn/kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp:19:
/usr/include/sys/feature_tests.h:96:1: warning: this is the location of the previous definition
/cad4/stevee/kde-svn/kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp: In function `int main(int, char**)':
/cad4/stevee/kde-svn/kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp:36: error: `setenv' was not declared in this scope
/cad4/stevee/kde-svn/kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp: In member function `void KUriFilterTest::init()':
/cad4/stevee/kde-svn/kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp:155: error: `setenv' was not declared in this scope
/cad4/stevee/kde-svn/kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp: In member function `void KUriFilterTest::tests()':
/cad4/stevee/kde-svn/kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp:271: error: `setenv' was not declared in this scope

It can be fixed by including <kdefakes.h>
Comment 1 Steve Evans 2007-05-18 12:10:52 UTC
Created attachment 20621 [details]
Include <kdefakes.h> so setenv is defined on Solaris
Comment 2 Pino Toscano 2007-08-01 00:42:27 UTC
SVN commit 694860 by pino:

#include kdefakes.h so we are sure to have the definition of setenv()

BUGS: 145564, 145624, 145745, 145754,  147080


 M  +1 -0      apps/kdepasswd/passwd.cpp  
 M  +1 -0      runtime/kioslave/fish/fish.cpp  
 M  +1 -0      runtime/kurifilter-plugins/tests/kurifiltertest.cpp  
 M  +1 -0      workspace/kcminit/main.cpp  
 M  +1 -0      workspace/libs/workspace/kworkspace.cpp  


--- trunk/KDE/kdebase/apps/kdepasswd/passwd.cpp #694859:694860
@@ -27,6 +27,7 @@
 
 #include <kdebug.h>
 #include <kstandarddirs.h>
+#include <kdefakes.h>
 
 #include <kdesu/process.h>
 
--- trunk/KDE/kdebase/runtime/kioslave/fish/fish.cpp #694859:694860
@@ -81,6 +81,7 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <sys/resource.h>
+#include <kdefakes.h>
 
 #include "fish.h"
 #include "fishcode.h"
--- trunk/KDE/kdebase/runtime/kurifilter-plugins/tests/kurifiltertest.cpp #694859:694860
@@ -25,6 +25,7 @@
 #include <ksharedconfig.h>
 #include <klocale.h>
 #include <kio/netaccess.h>
+#include <kdefakes.h>
 
 #include <QtCore/QDir>
 #include <QtCore/QRegExp>
--- trunk/KDE/kdebase/workspace/kcminit/main.cpp #694859:694860
@@ -43,6 +43,7 @@
 #endif
 
 #include <kservicetypetrader.h>
+#include <kdefakes.h>
 
 static int ready[ 2 ];
 static bool startup = false;
--- trunk/KDE/kdebase/workspace/libs/workspace/kworkspace.cpp #694859:694860
@@ -30,6 +30,7 @@
 #include <QtDBus/QtDBus>
 #include <stdlib.h> // getenv()
 #include <ksmserver_interface.h>
+#include <kdefakes.h>
 
 #ifdef Q_WS_X11
 #include <X11/Xlib.h>