As include/linux/compat.h is already taken upstream.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
COMPAT_LATEST_VERSION = 32
KERNEL_SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
-$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
+$(foreach ver,$(COMPAT_VERSIONS),$(eval export CONFIG_COMPAT_KERNEL_$(ver)=y))
endif
obj-y += compat/
# This hack lets us put our include path first than the kernel's
# when building our compat modules. Your own makefile would look
# the same.
-NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/linux/compat.h $(CFLAGS)
+NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/linux/compat-2.6.h $(CFLAGS)
modules:
$(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
$(MAKE) -C $(KLIB_BUILD) M=$(PWD) clean
all: modules
-clean-files := Module.symvers modules.order Module.markers
+clean-files := Module.symvers modules.order Module.markers compat/modules.order
--- /dev/null
+#ifndef LINUX_26_COMPAT_H
+#define LINUX_26_COMPAT_H
+
+#include <linux/autoconf.h>
+#include <linux/version.h>
+#include <linux/compat_autoconf.h>
+
+/*
+ * Each compat file represents compatibility code for new kernel
+ * code introduced for *that* kernel revision.
+ */
+
+#include <linux/compat-2.6.22.h>
+#include <linux/compat-2.6.23.h>
+#include <linux/compat-2.6.24.h>
+#include <linux/compat-2.6.25.h>
+#include <linux/compat-2.6.26.h>
+#include <linux/compat-2.6.27.h>
+#include <linux/compat-2.6.28.h>
+#include <linux/compat-2.6.29.h>
+#include <linux/compat-2.6.30.h>
+#include <linux/compat-2.6.31.h>
+#include <linux/compat-2.6.32.h>
+#include <linux/compat-2.6.33.h>
+
+#endif /* LINUX_26_COMPAT_H */
+++ /dev/null
-#ifndef LINUX_26_COMPAT_H
-#define LINUX_26_COMPAT_H
-
-#include <linux/autoconf.h>
-#include <linux/version.h>
-#include <linux/compat_autoconf.h>
-
-/*
- * Each compat file represents compatibility code for new kernel
- * code introduced for *that* kernel revision.
- */
-
-#include <linux/compat-2.6.22.h>
-#include <linux/compat-2.6.23.h>
-#include <linux/compat-2.6.24.h>
-#include <linux/compat-2.6.25.h>
-#include <linux/compat-2.6.26.h>
-#include <linux/compat-2.6.27.h>
-#include <linux/compat-2.6.28.h>
-#include <linux/compat-2.6.29.h>
-#include <linux/compat-2.6.30.h>
-#include <linux/compat-2.6.31.h>
-#include <linux/compat-2.6.32.h>
-#include <linux/compat-2.6.33.h>
-
-#endif /* LINUX_26_COMPAT_H */