Compile fix for kdebase-svn (may be 64bits only?)

Benjamin Schindler config at gentoo.org
Wed Jan 18 20:47:46 GMT 2006


Hi

On amd64, kdebase/kioslaves/mediamanager/fstabmanager.cpp (svn-trunk) won't 
compile. It gives: 

In file included from /usr/include/linux/byteorder/little_endian.h:11,
                 from /usr/include/asm-x86_64/byteorder.h:33,
                 from /usr/include/asm/byteorder.h:7,
                 from /usr/include/linux/cdrom.h:14,
                 
from /home/kde4/kdebase/kioslave/media/mediamanager/fstabbackend.cpp:32:
/usr/include/linux/types.h:179: error: conflicting declaration 'typedef __u64 
__le64'
/home/kde4/kdebase/kioslave/media/mediamanager/fstabbackend.cpp:29: error: 
'__le64' has a previous declaration as `typedef uint64_t __le64'
/usr/include/linux/types.h:179: error: declaration of `typedef __u64 __le64'
/home/kde4/kdebase/kioslave/media/mediamanager/fstabbackend.cpp:29: error: 
conflicts with previous declaration `typedef uint64_t __le64'
/usr/include/linux/types.h:179: error: declaration of `typedef __u64 __le64'
/home/kde4/kdebase/kioslave/media/mediamanager/fstabbackend.cpp:29: error: 
conflicts with previous declaration `typedef uint64_t __le64'
/usr/include/linux/types.h:180: error: conflicting declaration 'typedef __u64 
__be64'
/home/kde4/kdebase/kioslave/media/mediamanager/fstabbackend.cpp:30: error: 
'__be64' has a previous declaration as `typedef uint64_t __be64'
/usr/include/linux/types.h:180: error: declaration of `typedef __u64 __be64'
/home/kde4/kdebase/kioslave/media/mediamanager/fstabbackend.cpp:30: error: 
conflicts with previous declaration `typedef uint64_t __be64'
/usr/include/linux/types.h:180: error: declaration of `typedef __u64 __be64'
/home/kde4/kdebase/kioslave/media/mediamanager/fstabbackend.cpp:30: error: 
conflicts with previous declaration `typedef uint64_t __be64'
/home/kde4/kdebase/kioslave/media/mediamanager/fstabbackend.cpp:142: warning: 
unused parameter 'allowNotification'
Error creating ../../../kioslave/media/mediamanager/fstabbackend.lo. Exit 
status 1.


Applying this fixes the problem:

Index: kioslave/media/mediamanager/fstabbackend.cpp
===================================================================
--- kioslave/media/mediamanager/fstabbackend.cpp	(revision 499791)
+++ kioslave/media/mediamanager/fstabbackend.cpp	(working copy)
@@ -26,8 +26,8 @@
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <stdint.h>
-typedef uint64_t __le64; // workaround for some versions of kernel headers
-typedef uint64_t __be64; // workaround for some versions of kernel headers
+//typedef uint64_t __le64; // workaround for some versions of kernel headers
+//typedef uint64_t __be64; // workaround for some versions of kernel headers
 #undef __STRICT_ANSI__ // workaround for some version of kernel headers
 #include <linux/cdrom.h>
 #include <qfile.h>

(I'm sure this patch can be beautified or improved for other arches)

P.s. Please CC me as I'm not subscribed to this list




More information about the kde-core-devel mailing list