Bug 83457 - kmail doesn't compile, kmfolderindex.cpp needs to include fcntl.h
Summary: kmail doesn't compile, kmfolderindex.cpp needs to include fcntl.h
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-16 01:31 UTC by Aaron Williams
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Williams 2004-06-16 01:31:49 UTC
Version:            (using KDE KDE 3.2.3)
Installed from:    Compiled From Sources
Compiler:          gcc 3.3.3 Sparc Solaris 2.8
OS:                Solaris

kmail fails to compile with the following error:

if /bin/bash ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../libkdenetwork -I../libkdepim -I../libksieve -I../mimelib -I../ktnef -I.. -I/opt/kde3/3.2.3/include -I/opt/qt/qt-3.3.2/include   -I/opt/kdeshared/include  -DQT_THREAD_SUPPORT  -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -D_FILE_OFFSET_BITS=64  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -O2 -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT kmfolderindex.lo -MD -MP -MF ".deps/kmfolderindex.Tpo" -c -o kmfolderindex.lo kmfolderindex.cpp; \
then mv -f ".deps/kmfolderindex.Tpo" ".deps/kmfolderindex.Plo"; else rm -f ".deps/kmfolderindex.Tpo"; exit 1; fi
kmfolderindex.cpp: In member function `virtual int
   KMFolderIndex::writeIndex(bool)':
kmfolderindex.cpp:184: error: `F_SETFD' undeclared (first use this function)
kmfolderindex.cpp:184: error: (Each undeclared identifier is reported only once
   for each function it appears in.)
kmfolderindex.cpp:184: error: `FD_CLOEXEC' undeclared (first use this function)
kmfolderindex.cpp:184: error: `fcntl' undeclared (first use this function)
make[3]: *** [kmfolderindex.lo] Error 1
make[3]: Leaving directory `/var/tmp/kde/archive/3.2.3/kdepim-3.2.3/kmail'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/kde/archive/3.2.3/kdepim-3.2.3/kmail'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/kde/archive/3.2.3/kdepim-3.2.3'
make: *** [all] Error 2


The fix is to include fcntl.h, where FC_CLOEXEC is defined.
Comment 1 Don Sanders 2004-06-16 10:34:17 UTC
CVS commit by sanders: 

include fcntl.h to fix compile problem on Solaris as recommended by
aaronw, thank you aaron.

CCMAIL:83457-done@bugs.kde.org


  M +1 -0      kmfolderindex.cpp   1.19


--- kdepim/kmail/kmfolderindex.cpp  #1.18:1.19
@@ -31,4 +31,5 @@
 #include <assert.h>
 #include <utime.h>
+#include <fcntl.h>
 
 #ifdef HAVE_BYTESWAP_H