changeset 998:0e6627072f7a

Date: Wed, 24 Nov 2004 01:25:48 +0100 From: Stephane Marchesin Subject: Re: [SDL] Problem compiling SDL 1.2.7 - there is a bug that was introduced in the kernel headers for 2.6.9 which is fixed in 2.6.10. This bug *will* byte when compiling the cdrom subsystem. A patch that works around this bug is attached. Note that users affected are not those running 2.6.9, but those using the 2.6.9 kernel headers for their system (i.e. whose libc is built against 2.6.9 headers).
author Sam Lantinga <slouken@libsdl.org>
date Tue, 30 Nov 2004 14:45:08 +0000
parents 3bf4103b2b89
children 8be85fa59cf3
files src/cdrom/linux/SDL_syscdrom.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cdrom/linux/SDL_syscdrom.c	Tue Nov 30 14:28:20 2004 +0000
+++ b/src/cdrom/linux/SDL_syscdrom.c	Tue Nov 30 14:45:08 2004 +0000
@@ -37,6 +37,17 @@
 #include <errno.h>
 #include <unistd.h>
 #ifdef __linux__
+/* linux 2.6.9 workaround */
+#include <linux/version.h>
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,9)
+#include <asm/types.h>
+#define __le64 __u64
+#define __le32 __u32
+#define __le16 __u16
+#define __be64 __u64
+#define __be32 __u32
+#define __be16 __u16
+#endif /* linux 2.6.9 workaround */
 #include <linux/cdrom.h>
 #endif
 #ifdef __SVR4