Dash:
[t2.git] / package / x86 / apmd / hotfixes.patch
blobb08d1a7106cd8538fa6358ea701432bebcfe392d
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../apmd/hotfixes.patch
5 # Copyright (C) 2007 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 diff -Nur apmd-orig/apmsleep.c apmd/apmsleep.c
18 --- apmd-orig/apmsleep.c 2001-05-11 20:30:08.000000000 +0000
19 +++ apmd/apmsleep.c 2007-10-19 13:30:35.000000000 +0000
20 @@ -42,14 +42,24 @@
24 +typedef unsigned char u8;
25 +typedef unsigned short u16;
26 +typedef unsigned int u32;
28 #include <stdio.h>
29 #include <linux/version.h>
31 -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,2,0)
32 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
33 +#include <linux/rtc.h>
34 +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
35 +#include <linux/spinlock.h>
36 +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
37 #include <asm/spinlock.h>
38 #endif
40 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
41 #include <linux/mc146818rtc.h>
42 +#endif
43 #include <sys/ioctl.h>
44 #include <sys/time.h>
45 #include <sys/types.h>