lkml.org 
[lkml]   [2004]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.6.9-rc2] Fix types.h
Hi!

This patch fixes troubles when compiling some applications that include
<linux/byteorder/little_endian.h>, like xmms. When I was compiling xmms
I've got:
In file included from /usr/include/asm/byteorder.h:57,
from /usr/include/linux/cdrom.h:14,
from cdaudio.h:60,
from cdaudio.c:21:
/usr/include/linux/byteorder/little_endian.h:43: error: parse error
before "__cpu_to_le64p"
/usr/include/linux/byteorder/little_endian.h: In function `__cpu_to_le64p':
/usr/include/linux/byteorder/little_endian.h:45: error: `__le64'
undeclared (first use in this function)
...etc...

I've put the __le(16|32|64) and __be(16|32|64) typedefs out of #ifndef
__KERNEL_STRICT_NAMES and now everything is working. Xmms is compiling
fine, and linux kernel too. :)

Maybe I made something wrong, because this is my first patch to linux
kernel... But everything is working fine for me.

Regards,
Cadu
--- linux-2.6.9-rc2/include/linux/types.h 2004-09-13 02:33:23.000000000 -0300
+++ linux/include/linux/types.h 2004-09-18 14:16:27.000000000 -0300
@@ -140,6 +140,13 @@
#define pgoff_t unsigned long
#endif

+#endif /* __KERNEL_STRICT_NAMES */
+
+/*
+ * Below are truly Linux-specific types that should never collide with
+ * any application/library that wants linux/types.h.
+ */
+
#ifdef __CHECKER__
#define __bitwise __attribute__((bitwise))
#else
@@ -153,13 +160,6 @@
typedef __u64 __bitwise __le64;
typedef __u64 __bitwise __be64;

-#endif /* __KERNEL_STRICT_NAMES */
-
-/*
- * Below are truly Linux-specific types that should never collide with
- * any application/library that wants linux/types.h.
- */
-
struct ustat {
__kernel_daddr_t f_tfree;
__kernel_ino_t f_tinode;
\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.209 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site