From 6ce8ea8a4590fa59e8987392960983254fdfc16e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 1 Sep 2004 02:24:37 -0700 Subject: Use "ifdef" rather than "if" to test for __KERNEL__ Both work, but the latter can cause warnings in user space from compilers that don't like using undefined identifiers in preprocessor expressions (quite reasonable). Pointed out by Randy Dunlap. --- include/linux/kobject.h | 2 +- include/linux/kref.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/kobject.h b/include/linux/kobject.h index f3f20feee67b..331d25b9cc41 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -15,7 +15,7 @@ #ifndef _KOBJECT_H_ #define _KOBJECT_H_ -#if __KERNEL__ +#ifdef __KERNEL__ #include #include diff --git a/include/linux/kref.h b/include/linux/kref.h index a8a8b05ca3d0..ea5948785ebf 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h @@ -15,7 +15,7 @@ #ifndef _KREF_H_ #define _KREF_H_ -#if __KERNEL__ +#ifdef __KERNEL__ #include #include -- cgit v1.2.3