diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-10-31 00:44:00 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-31 00:44:00 -0400 |
commit | 97ef1bb0c8e371b7988287f38bd107c4aa14d78d (patch) | |
tree | ecf658ca568ae33536578ed3bb48eae2a813eb23 /include/linux | |
parent | f3baa4827a4b13905dbbdddf15463541bd671dfd (diff) |
[TIPC]: Fix headercheck wrt. tipc_config.h
It wants string functions like memcpy() for inline
routines, and these define userland interfaces.
The only clean way to deal with this is to simply
put linux/string.h into unifdef-y and have it
include <string.h> when not-__KERNEL__.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/string.h | 12 |
2 files changed, 4 insertions, 9 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index bd33c22315c1..37bfa19d8064 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -326,6 +326,7 @@ unifdef-y += sonypi.h | |||
326 | unifdef-y += soundcard.h | 326 | unifdef-y += soundcard.h |
327 | unifdef-y += stat.h | 327 | unifdef-y += stat.h |
328 | unifdef-y += stddef.h | 328 | unifdef-y += stddef.h |
329 | unifdef-y += string.h | ||
329 | unifdef-y += synclink.h | 330 | unifdef-y += synclink.h |
330 | unifdef-y += sysctl.h | 331 | unifdef-y += sysctl.h |
331 | unifdef-y += tcp.h | 332 | unifdef-y += tcp.h |
diff --git a/include/linux/string.h b/include/linux/string.h index 836062b7582a..c5d3fcad7b57 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -3,16 +3,14 @@ | |||
3 | 3 | ||
4 | /* We don't want strings.h stuff being user by user stuff by accident */ | 4 | /* We don't want strings.h stuff being user by user stuff by accident */ |
5 | 5 | ||
6 | #ifdef __KERNEL__ | 6 | #ifndef __KERNEL__ |
7 | #include <string.h> | ||
8 | #else | ||
7 | 9 | ||
8 | #include <linux/compiler.h> /* for inline */ | 10 | #include <linux/compiler.h> /* for inline */ |
9 | #include <linux/types.h> /* for size_t */ | 11 | #include <linux/types.h> /* for size_t */ |
10 | #include <linux/stddef.h> /* for NULL */ | 12 | #include <linux/stddef.h> /* for NULL */ |
11 | 13 | ||
12 | #ifdef __cplusplus | ||
13 | extern "C" { | ||
14 | #endif | ||
15 | |||
16 | extern char *strndup_user(const char __user *, long); | 14 | extern char *strndup_user(const char __user *, long); |
17 | 15 | ||
18 | /* | 16 | /* |
@@ -111,9 +109,5 @@ extern void *kmemdup(const void *src, size_t len, gfp_t gfp); | |||
111 | extern char **argv_split(gfp_t gfp, const char *str, int *argcp); | 109 | extern char **argv_split(gfp_t gfp, const char *str, int *argcp); |
112 | extern void argv_free(char **argv); | 110 | extern void argv_free(char **argv); |
113 | 111 | ||
114 | #ifdef __cplusplus | ||
115 | } | ||
116 | #endif | ||
117 | |||
118 | #endif | 112 | #endif |
119 | #endif /* _LINUX_STRING_H_ */ | 113 | #endif /* _LINUX_STRING_H_ */ |