Version: (using KDE KDE 3.1.92) Installed from: Compiled From Sources Compiler: gcc version 2.95.3 20010315 (release) OS: Solaris Another compilation problem on Solaris: source='kmfolderindex.cpp' object='kmfolderindex.lo' libtool=yes \ depfile='.deps/kmfolderindex.Plo' tmpdepfile='.deps/kmfolderindex.TPlo' \ depmode=gcc /bin/ksh ../admin/depcomp \ /bin/ksh ../libtool --silent --mode=compile --tag=CXX g++ -pipe -DHAVE_CONFIG_H -I. -I. -I.. -I../libkdenetwork -I../libkdepim -I../libksieve -I../mimelib -I../ktnef -I.. -I/vol/kde-cvs/include -I/vol/qt-3.2.1/include -I/vol/local/include -I/vol/graphics/include -I/vol/palmpilot/include -DQT_THREAD_SUPPORT -I/vol/palmpilot/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -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 -c -o kmfolderindex.lo `test -f 'kmfolderindex.cpp' || echo './'`kmfolderindex.cpp kmfolderindex.cpp: In method `bool KMFolderIndex::updateIndexStreamPtr(bool = FALSE)': kmfolderindex.cpp:373: passing `uchar *' as argument 1 of `munmap(char *, unsigned int)' changes signedness kmfolderindex.cpp:383: passing `uchar *' as argument 1 of `munmap(char *, unsigned int)' changes signedness kmfolderindex.cpp:389: passing `uchar *' as argument 1 of `munmap(char *, unsigned int)' changes signedness make[1]: *** [kmfolderindex.lo] Error 1 make[1]: Leaving directory `/vol/src/kde/cvs/kdepim/kmail' make: *** [all-recursive] Error 1
Created attachment 2649 [details] patch for kdepim/kmail/kmfolderindex.cpp Although munmap(2) tells me that munmap() should take a "void *" as its first argument, it seems that I need the attached patch to make KMail compile...
Subject: kdepim/kmail CVS commit by mutz: Fix Solaris compile errors reported and patched by Torsten Kasch <tk (at ) Genetik (dot) uni-bielefeld (dot) de> CCMAIL: 65234-done@bugs.kde.org, 65232-done@bugs.kde.org M +3 -3 kmfolderindex.cpp 1.11 M +1 -1 kmmsgbase.cpp 1.160 --- kdepim/kmail/kmfolderindex.cpp #1.10:1.11 @@ -371,5 +371,5 @@ bool KMFolderIndex::updateIndexStreamPtr if(just_close) { if(mIndexStreamPtr) - munmap(mIndexStreamPtr, mIndexStreamPtrLength); + munmap((char *)mIndexStreamPtr, mIndexStreamPtrLength); mIndexStreamPtr = 0; mIndexStreamPtrLength = 0; @@ -381,5 +381,5 @@ bool KMFolderIndex::updateIndexStreamPtr if(fstat(fileno(mIndexStream), &stat_buf) == -1) { if(mIndexStreamPtr) - munmap(mIndexStreamPtr, mIndexStreamPtrLength); + munmap((char *)mIndexStreamPtr, mIndexStreamPtrLength); mIndexStreamPtr = 0; mIndexStreamPtrLength = 0; @@ -387,5 +387,5 @@ bool KMFolderIndex::updateIndexStreamPtr } if(mIndexStreamPtr) - munmap(mIndexStreamPtr, mIndexStreamPtrLength); + munmap((char *)mIndexStreamPtr, mIndexStreamPtrLength); mIndexStreamPtrLength = stat_buf.st_size; mIndexStreamPtr = (uchar *)mmap(0, mIndexStreamPtrLength, PROT_READ, MAP_SHARED, --- kdepim/kmail/kmmsgbase.cpp #1.159:1.160 @@ -1145,5 +1145,5 @@ off_t KMMsgBase::getLongPart(MsgPartType #ifndef WORDS_BIGENDIAN // We need to use swab to swap bytes to network byte order -#define memcpy_networkorder(to, from, len) swab(from, to, len) +#define memcpy_networkorder(to, from, len) swab((char *)(from), (char *)(to), len) #else // We're already in network byte order