diff -rNaud xfce4-battery-plugin-0.5.0.1-orig/panel-plugin/libapm.h xfce4-battery-plugin-0.5.0.1/panel-plugin/libapm.h
--- xfce4-battery-plugin-0.5.0.1-orig/panel-plugin/libapm.h	2007-07-26 22:09:57.000000000 +0200
+++ xfce4-battery-plugin-0.5.0.1/panel-plugin/libapm.h	2008-03-26 23:05:08.000000000 +0100
@@ -17,6 +17,8 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+// Patched for 2.6.24 headers
+#include <features.h>
 #include <linux/apm_bios.h>
 #include <sys/types.h>
 
@@ -30,6 +32,9 @@
 #define APM_32_BIT_SUPPORT      0x0002
 #endif
 
+typedef unsigned short apm_event_t;
+typedef unsigned short apm_eventinfo_t;
+
 typedef struct apm_info
 {
     const char driver_version[10];