1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../apmd/hotfixes.patch
5 # Copyright (C) 2007 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
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
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
24 +typedef unsigned char u8;
25 +typedef unsigned short u16;
26 +typedef unsigned int u32;
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>
40 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
41 #include <linux/mc146818rtc.h>
43 #include <sys/ioctl.h>
45 #include <sys/types.h>