Solution to the conflicting types for 'timer _ t' problem during program Compilation: An error occurred while installing the battery monitor plug-in slackware 12.1-xfce 4.4.2
Bytes:
In file encoded ded from./libapm. h: 21,
From battery. C: 39:
/Usr/include/sys/types. h: 62: Error: conflicting types for 'dev _ t'
/Usr/include/Linux/types. h: 19: Error: previous declaration of 'dev _ t' was here
/Usr/include/sys/types. h: 67: Error: conflicting types for 'Gid _ t'
/Usr/include/Linux/types. h: 53: Error: previous declaration of 'Gid _ t' was here
/Usr/include/sys/types. h: 72: Error: conflicting types for 'mode _ t'
/Usr/include/Linux/types. h: 21: Error: previous declaration of 'Mode _ t' was here
/Usr/include/sys/types. h: 77: Error: conflicting types for 'nlink _ t'
/Usr/include/Linux/types. h: 22: Error: previous declaration of 'nlink _ t' was here
/Usr/include/sys/types. h: 82: Error: conflicting types for 'uid _ t'
/Usr/include/Linux/types. h: 52: Error: previous declaration of 'uid _ t' was here
In file included from/usr/include/sys/types. h: 133,
From./libapm. h: 21,
From battery. C: 39:
/Usr/include/time. h: 105: Error: conflicting types for 'timer _ t'
/Usr/include/Linux/types. h: 28: Error: previous declaration of 'timer _ t' was here
In file included from/usr/include/sys/types. h: 220,
From./libapm. h: 21,
From battery. C: 39:
/Usr/include/sys/select. h: 78: Error: conflicting types for 'fd _ set'
/Usr/include/Linux/types. h: 18: Error: previous declaration of 'fd _ set' was here
In file encoded ded from./libapm. h: 21,
From battery. C: 39:
/Usr/include/sys/types. h: 235: Error: conflicting types for 'blkcnt _ t'
/Usr/include/Linux/types. h: 151: Error: previous declaration of 'blkcnt _ t' was here
Make [2]: *** [xfce4_battery_plugin-battery.o] Error 1
Make [2]: Leaving directory '/tmp/xfce4-battery-plugin-0.5.1/panel-plugin'
Make [1]: *** [All-recursive] Error 1
Make [1]: Leaving directory '/tmp/xfce4-battery-plugin-0.5.1'
Make: *** [all] Error 2
Solution:
Open panel-plugin/libapm. h
Swap the positions of the following two rows
# Include <Linux/apm_bios.h>
# Include <sys/types. h>
Change
# Include <sys/types. h>
# Include <Linux/apm_bios.h>
Recompile and pass!