An ifdef in drm.h expects to be compiled with full-fledged Linux toolchain, but it's common to compile kernel with just bare-metal toolchain which doesn't define __linux__. So, also add __KERNEL__ check.
Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org --- include/drm/drm.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/drm/drm.h b/include/drm/drm.h index 4be33b4..45435e3 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h @@ -36,7 +36,7 @@ #ifndef _DRM_H_ #define _DRM_H_
-#if defined(__linux__) +#if defined(__KERNEL__) || defined(__linux__)
#include <linux/types.h> #include <asm/ioctl.h>
Hello,
Just to give more background, compilation error apparently caused by this happened during building kernel-tilt with upstream android toolchain: https://android-build.linaro.org/jenkins/job/patrik-ryd_lt-panda/8/consoleFu...
CC drivers/gpu/drm/drm_auth.o In file included from include/drm/drmP.h:76, from drivers/gpu/drm/drm_auth.c:36: include/drm/drm.h:47:24: error: sys/ioccom.h: No such file or directory include/drm/drm.h:48:23: error: sys/types.h: No such file or directory In file included from include/drm/drmP.h:76, from drivers/gpu/drm/drm_auth.c:36:
Google knows about at least couple more cases: http://www.google.com/search?client=ubuntu&channel=fs&q=include%2Fdr...
On Fri, 3 Jun 2011 18:04:45 +0300 Paul Sokolovsky paul.sokolovsky@linaro.org wrote:
An ifdef in drm.h expects to be compiled with full-fledged Linux toolchain, but it's common to compile kernel with just bare-metal toolchain which doesn't define __linux__. So, also add __KERNEL__ check.
Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
include/drm/drm.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/drm/drm.h b/include/drm/drm.h index 4be33b4..45435e3 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h @@ -36,7 +36,7 @@ #ifndef _DRM_H_ #define _DRM_H_ -#if defined(__linux__) +#if defined(__KERNEL__) || defined(__linux__) #include <linux/types.h> #include <asm/ioctl.h>
On 06/03/2011 04:16 PM, Somebody in the thread at some point said:
Hello,
Just to give more background, compilation error apparently caused by this happened during building kernel-tilt with upstream android toolchain: https://android-build.linaro.org/jenkins/job/patrik-ryd_lt-panda/8/consoleFu...
CC drivers/gpu/drm/drm_auth.o In file included from include/drm/drmP.h:76, from drivers/gpu/drm/drm_auth.c:36: include/drm/drm.h:47:24: error: sys/ioccom.h: No such file or directory include/drm/drm.h:48:23: error: sys/types.h: No such file or directory In file included from include/drm/drmP.h:76, from drivers/gpu/drm/drm_auth.c:36:
Google knows about at least couple more cases: http://www.google.com/search?client=ubuntu&channel=fs&q=include%2Fdr...
Right, the makefiles in the pvr subdirs bodge -D__linux__ on and that works, but if you include those patched includes from anywhere in normal kernel space-time it'd blow chunks... nice fix.
-Andy