public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.6.9-rc2] Fix types.h
@ 2004-09-18 17:27 Carlos Eduardo Medaglia Dyonisio
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos Eduardo Medaglia Dyonisio @ 2004-09-18 17:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: medaglia

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

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

[-- Attachment #2: patch-types.h.diff --]
[-- Type: text/plain, Size: 790 bytes --]

--- 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [PATCH][2.6.9-rc2] Fix types.h
@ 2004-09-23  0:29 Carlos Eduardo Medaglia Dyonisio
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos Eduardo Medaglia Dyonisio @ 2004-09-23  0:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: medaglia, akpm, torvalds

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

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


[-- Attachment #2: patch-types.h.diff --]
[-- Type: text/plain, Size: 791 bytes --]

--- 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;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-23  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-18 17:27 [PATCH][2.6.9-rc2] Fix types.h Carlos Eduardo Medaglia Dyonisio
  -- strict thread matches above, loose matches on Subject: below --
2004-09-23  0:29 Carlos Eduardo Medaglia Dyonisio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox