Use new paths for generated header files with Linux >= 2.6.33
On Linux >= 2.6.33, use <generated/autoconf.h> instead of <linux/autoconf.h>. Include it after <linux/version.h>. Use generated/utsrelease.h as VERSION_HEADER if present instead of linux/utsrelease.h or linux/version.h.
This commit is contained in:
@@ -27,13 +27,18 @@
|
|||||||
/*
|
/*
|
||||||
* Include this first as it defines things that affect the kernel headers.
|
* Include this first as it defines things that affect the kernel headers.
|
||||||
*/
|
*/
|
||||||
#include <linux/autoconf.h>
|
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
|
|
||||||
#ifndef KERNEL_VERSION
|
#ifndef KERNEL_VERSION
|
||||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
|
||||||
|
#include <generated/autoconf.h>
|
||||||
|
#else
|
||||||
|
#include <linux/autoconf.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,115)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,115)
|
||||||
/*
|
/*
|
||||||
* It might work with smaller kernels, but I never tested that.
|
* It might work with smaller kernels, but I never tested that.
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
2011-05-27 Guillem Jover <guillem@hadrons.org>
|
||||||
|
|
||||||
|
* 3dfx_driver.c: On Linux >= 2.6.33, use <generated/autoconf.h>
|
||||||
|
instead of <linux/autoconf.h>. Include it after <linux/version.h>.
|
||||||
|
* Makefile (VERSION_HEADER): Use generated/utsrelease.h if present
|
||||||
|
instead of linux/utsrelease.h or linux/version.h.
|
||||||
|
|
||||||
2011-05-27 Guillem Jover <guillem@hadrons.org>
|
2011-05-27 Guillem Jover <guillem@hadrons.org>
|
||||||
|
|
||||||
* Makefile: Do not use negative exit codes.
|
* Makefile: Do not use negative exit codes.
|
||||||
|
|||||||
@@ -26,11 +26,15 @@ ALL_CFLAGS := -DMODULE -D__KERNEL__ \
|
|||||||
-I$(KHEADERS) -I$(KHEADERS)/asm/mach-default \
|
-I$(KHEADERS) -I$(KHEADERS)/asm/mach-default \
|
||||||
$(CFLAGS)
|
$(CFLAGS)
|
||||||
|
|
||||||
|
ifneq ($(wildcard $(KHEADERS)/generated/utsrelease.h),)
|
||||||
|
VERSION_HEADER := $(KHEADERS)/generated/utsrelease.h
|
||||||
|
else
|
||||||
ifneq ($(wildcard $(KHEADERS)/linux/utsrelease.h),)
|
ifneq ($(wildcard $(KHEADERS)/linux/utsrelease.h),)
|
||||||
VERSION_HEADER := $(KHEADERS)/linux/utsrelease.h
|
VERSION_HEADER := $(KHEADERS)/linux/utsrelease.h
|
||||||
else
|
else
|
||||||
VERSION_HEADER := $(KHEADERS)/linux/version.h
|
VERSION_HEADER := $(KHEADERS)/linux/version.h
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# You should never need to change anything below.
|
# You should never need to change anything below.
|
||||||
|
|||||||
Reference in New Issue
Block a user