Skip to contentSkip to conversation

Fix types.h

PATCH New Carlos Eduardo Medaglia Dyonisio 1 participant 1 message Sep 18, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

include/linux/types.h +7 -7
@@ -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;