Submitted By: Jim Gifford (jim at linuxfromscratch dot org) Date: 2004-05-06 Initial Package Version: 2.01 Origin: Jim Gifford and http://kerneltrap.org/node/view/879 Upstream Status: Sent Description: Fixes CDRTools Compile with the 2.6 Kernel diff -Naur cdrtools-2.01.orig/DEFAULTS/Defaults.gnu cdrtools-2.01/DEFAULTS/Defaults.gnu --- cdrtools-2.01.orig/DEFAULTS/Defaults.gnu 2003-02-16 00:01:47.000000000 +0000 +++ cdrtools-2.01/DEFAULTS/Defaults.gnu 2004-05-07 00:52:58.111410726 +0000 @@ -18,7 +18,7 @@ ########################################################################### CWARNOPTS= -DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include +DEFINCDIRS= $(SRCROOT)/include LDPATH= -L/opt/schily/lib RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR) diff -Naur cdrtools-2.01.orig/DEFAULTS/Defaults.linux cdrtools-2.01/DEFAULTS/Defaults.linux --- cdrtools-2.01.orig/DEFAULTS/Defaults.linux 2003-02-16 00:01:48.000000000 +0000 +++ cdrtools-2.01/DEFAULTS/Defaults.linux 2004-05-07 00:53:05.850026970 +0000 @@ -18,7 +18,7 @@ ########################################################################### CWARNOPTS= -DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include +DEFINCDIRS= $(SRCROOT)/include LDPATH= -L/opt/schily/lib RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR) diff -Naur cdrtools-2.01.orig/libscg/scsi-linux-sg.c cdrtools-2.01/libscg/scsi-linux-sg.c --- cdrtools-2.01.orig/libscg/scsi-linux-sg.c 2004-04-18 10:26:44.000000000 +0000 +++ cdrtools-2.01/libscg/scsi-linux-sg.c 2004-05-07 00:52:47.953227014 +0000 @@ -65,6 +65,14 @@ #if LINUX_VERSION_CODE >= 0x01031a /* introduced in 1.3.26 */ #if LINUX_VERSION_CODE >= 0x020000 /* introduced somewhere. */ + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) + #define __KERNEL__ + #include + #include + #undef __KERNEL__ +#endif + /* Need to fine tune the ifdef so we get the transition point right. */ #include #else