generic 2.6.24 support
[openwrt-10.03/.git] / target / linux / generic-2.6 / patches-2.6.24 / 900-headers_type_and_time.patch
1 Index: linux-2.6.23-rc6/include/linux/time.h
2 ===================================================================
3 --- linux-2.6.23-rc6.orig/include/linux/time.h  2007-09-21 16:23:52.000000000 +0800
4 +++ linux-2.6.23-rc6/include/linux/time.h       2007-09-21 16:24:09.000000000 +0800
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 @@ -227,4 +231,6 @@
17   */
18  #define TIMER_ABSTIME                  0x01
19  
20 +#endif /* __KERNEL__ DEBIAN */
21 +
22  #endif
23 Index: linux-2.6.23-rc6/include/linux/types.h
24 ===================================================================
25 --- linux-2.6.23-rc6.orig/include/linux/types.h 2007-09-21 16:23:52.000000000 +0800
26 +++ linux-2.6.23-rc6/include/linux/types.h      2007-09-21 16:24:09.000000000 +0800
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 @@
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.