3029ce28ec9f478078c95a94ceb816c2bcb0e2af
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.21 / 900-headers_type_and_time.patch
1 Index: linux-2.6.21.7/include/linux/time.h
2 ===================================================================
3 --- linux-2.6.21.7.orig/include/linux/time.h
4 +++ linux-2.6.21.7/include/linux/time.h
5 @@ -1,6 +1,10 @@
6 #ifndef _LINUX_TIME_H
7 #define _LINUX_TIME_H
8
9 +#ifndef __KERNEL__
10 +#include <time.h>
11 +#else
12 +
13 #include <linux/types.h>
14
15 #ifdef __KERNEL__
16 @@ -224,4 +228,6 @@ struct itimerval {
17 */
18 #define TIMER_ABSTIME 0x01
19
20 +#endif /* __KERNEL__ DEBIAN */
21 +
22 #endif
23 Index: linux-2.6.21.7/include/linux/types.h
24 ===================================================================
25 --- linux-2.6.21.7.orig/include/linux/types.h
26 +++ linux-2.6.21.7/include/linux/types.h
27 @@ -1,6 +1,14 @@
28 #ifndef _LINUX_TYPES_H
29 #define _LINUX_TYPES_H
30
31 +/* Debian: Use userland types instead. */
32 +#ifndef __KERNEL__
33 +# include <sys/types.h>
34 +/* For other kernel headers. */
35 +# include <linux/posix_types.h>
36 +# include <asm/types.h>
37 +#else
38 +
39 #ifdef __KERNEL__
40
41 #define BITS_TO_LONGS(bits) \
42 @@ -162,6 +170,8 @@ typedef unsigned long blkcnt_t;
43
44 #endif /* __KERNEL_STRICT_NAMES */
45
46 +#endif /* __KERNEL__ DEBIAN */
47 +
48 /*
49 * Below are truly Linux-specific types that should never collide with
50 * any application/library that wants linux/types.h.