diff -ur lin_tape-3.0.18/Makefile lin_tape-3.0.18-ifdefs/Makefile --- lin_tape-3.0.18/Makefile 2017-05-09 21:11:32.977092391 +0200 +++ lin_tape-3.0.18-ifdefs/Makefile 2017-05-09 21:05:59.610307494 +0200 @@ -20,27 +20,6 @@ lin_tape-objs := join.o lin_tape_scsi_config.o lin_tape_scsi_tape.o lin_tape_scsi_trace.o \ lin_tape_ioctl_tape.o lin_tape_ioctl_changer.o lin_tape_extra_ioctl.o -RHELRELEASE := $(shell [ -f "/etc/redhat-release" ] && echo 1 || echo 0) -ifeq ($(RHELRELEASE), 1) -KERNELDIR ?= /lib/modules/$(shell uname -r)/build -KERNELVER = $(shell uname -r 2>/dev/null|sed "s/[\.-]/_/g"|sed "s/\([0-9]*_[0-9]*_[0-9]*_[0-9]*\).*/\1/") -EXTRA_CFLAGS += -DKERNELVERSION_${KERNELVER} -else -UBUNTURELEASE := $(shell [ -f "/etc/os-release" ] && grep -qi Ubuntu /etc/os-release && echo 1 || echo 0) -ifeq ($(UBUNTURELEASE), 1) -EXTRA_CFLAGS += -DUBUNTUVERSION -else -EXTRA_CFLAGS += -DSLESVERSION -KERNELDIR ?= /lib/modules/$(shell uname -r)/build -KERNELVER = $(shell uname -r 2>/dev/null|sed "s/[\.-]/_/g"|sed "s/\([0-9]*_[0-9]*_[0-9]*_[0-9]*\).*/\1/") -EXTRA_CFLAGS += -DSLESKERNEL_${KERNELVER} -SLESSP2 := $(shell grep -qi SP2 /etc/*release && echo 1 || echo 0) -ifeq ($(SLESSP2), 1) -EXTRA_CFLAGS += -DSLESSP2 -endif -endif -endif - ifeq ($(SFMP), 1) EXTRA_CFLAGS += -DSFMPENABLED endif diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h --- lin_tape-3.0.18/pfo.h 2017-02-23 19:14:41.000000000 +0100 +++ lin_tape-3.0.18-ifdefs/pfo.h 2017-05-09 21:06:34.117699008 +0200 @@ -26,133 +26,6 @@ * will build for various releases of Linux. This is how * we track different versions using ifdef in the source. */ -#ifdef KERNELVERSION_2_6_32_220 -#define BEFORE_RH_63 1 -#define BEFORE_RH_64 1 -#define BEFORE_RH_65 1 -#define BEFORE_RH_66 1 -#define BEFORE_RH_67 1 -#define BEFORE_RH_70 1 -#define BEFORE_RH_71 1 -#define BEFORE_RH_72 1 -#endif -#ifdef KERNELVERSION_2_6_32_279 -#define AFTER_RH_62 1 -#define BEFORE_RH_64 1 -#define BEFORE_RH_65 1 -#define BEFORE_RH_66 1 -#define BEFORE_RH_67 1 -#define BEFORE_RH_70 1 -#define BEFORE_RH_71 1 -#define BEFORE_RH_72 1 -#endif -#ifdef KERNELVERSION_2_6_32_358 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define BEFORE_RH_65 1 -#define BEFORE_RH_66 1 -#define BEFORE_RH_67 1 -#define BEFORE_RH_70 1 -#define BEFORE_RH_72 1 -#endif -#ifdef KERNELVERSION_2_6_32_431 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define AFTER_RH_64 1 -#define BEFORE_RH_66 1 -#define BEFORE_RH_67 1 -#define BEFORE_RH_70 1 -#define BEFORE_RH_71 1 -#define BEFORE_RH_72 1 -#endif -#ifdef KERNELVERSION_2_6_32_504 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define AFTER_RH_64 1 -#define AFTER_RH_65 1 -#define BEFORE_RH_67 1 -#define BEFORE_RH_70 1 -#define BEFORE_RH_71 1 -#define BEFORE_RH_72 1 -#endif -#ifdef KERNELVERSION_2_6_32_573 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define AFTER_RH_64 1 -#define AFTER_RH_65 1 -#define AFTER_RH_66 1 -#define BEFORE_RH_70 1 -#define BEFORE_RH_71 1 -#define BEFORE_RH_72 1 -#endif -#ifdef KERNELVERSION_2_6_32_642 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define AFTER_RH_64 1 -#define AFTER_RH_65 1 -#define AFTER_RH_66 1 -#define AFTER_RH_67 1 -#define BEFORE_RH_70 1 -#define BEFORE_RH_71 1 -#define BEFORE_RH_72 1 -#endif -#ifdef KERNELVERSION_2_6_32_696 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define AFTER_RH_64 1 -#define AFTER_RH_65 1 -#define AFTER_RH_66 1 -#define AFTER_RH_67 1 -#define AFTER_RH_68 1 -#define BEFORE_RH_70 1 -#define BEFORE_RH_71 1 -#define BEFORE_RH_72 1 -#endif -#ifdef KERNELVERSION_3_10_0_123 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define AFTER_RH_64 1 -#define AFTER_RH_65 1 -#define AFTER_RH_66 1 -#define AFTER_RH_67 1 -#define AFTER_RH_6x 1 -#define BEFORE_RH_71 1 -#endif -#ifdef KERNELVERSION_3_10_0_229 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define AFTER_RH_64 1 -#define AFTER_RH_65 1 -#define AFTER_RH_66 1 -#define AFTER_RH_67 1 -#define AFTER_RH_6x 1 -#define AFTER_RH_70 1 -#define BEFORE_RH_72 1 -#endif -#ifdef KERNELVERSION_3_10_0_327 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define AFTER_RH_64 1 -#define AFTER_RH_65 1 -#define AFTER_RH_66 1 -#define AFTER_RH_67 1 -#define AFTER_RH_6x 1 -#define AFTER_RH_70 1 -#define AFTER_RH_71 1 -#endif -#ifdef KERNELVERSION_3_10_0_514 -#define AFTER_RH_62 1 -#define AFTER_RH_63 1 -#define AFTER_RH_64 1 -#define AFTER_RH_65 1 -#define AFTER_RH_66 1 -#define AFTER_RH_67 1 -#define AFTER_RH_6x 1 -#define AFTER_RH_70 1 -#define AFTER_RH_71 1 -#define AFTER_RH_72 1 -#endif -#ifdef KERNELVERSION_3_10_0_693 #define AFTER_RH_62 1 #define AFTER_RH_63 1 #define AFTER_RH_64 1 @@ -126,7 +35,6 @@ #define AFTER_RH_71 1 #define AFTER_RH_72 1 #define AFTER_RH_73 1 -#endif /* Misc defines needed so source is same for all versions of Linux */ #ifndef SDEV_TRANSPORT_OFFLINE