Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
Date: 2004-02-08
Initial Package Version: 1.1.7
Origin: http://kerneltrap.org/node/view/879
Upstream Status: To be included in 1.1.9
Description: Fixes Compile Issues with the 2.6 Kernel

 
diff -Naur cdrdao-1.1.7.orig/scsilib/libscg/scsi-linux-sg.c cdrdao-1.1.7/scsilib/libscg/scsi-linux-sg.c
--- cdrdao-1.1.7.orig/scsilib/libscg/scsi-linux-sg.c	2001-11-25 15:35:10.000000000 +0000
+++ cdrdao-1.1.7/scsilib/libscg/scsi-linux-sg.c	2004-02-08 19:20:46.141424418 +0000
@@ -65,6 +65,13 @@
 
 #if LINUX_VERSION_CODE >= 0x01031a /* <linux/scsi.h> introduced in 1.3.26 */
 #if LINUX_VERSION_CODE >= 0x020000 /* <scsi/scsi.h> introduced somewhere. */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
+	#define __KERNEL__
+	#include <asm/types.h>
+	#undef __KERNEL__
+#endif
+
 /* Need to fine tune the ifdef so we get the transition point right. */
 #include <scsi/scsi.h>
 #else
