I tried to compile this on a system running a 4.12.12 kernel and got the following errors (which may or may not be related to the version of the kernel)
$ make
make -C /lib/modules/4.12.12-gentoo/build M=/home/thoth/vendor/tuxedo-wmi/src modules
make[1]: Entering directory '/usr/src/linux-4.12.12-gentoo'
CC [M] /home/thoth/vendor/tuxedo-wmi/src/tuxedo-wmi.o
In file included from ./include/linux/mmdebug.h:4:0,
from ./include/linux/gfp.h:4,
from ./include/linux/slab.h:14,
from ./include/linux/resource_ext.h:19,
from ./include/linux/acpi.h:26,
from /home/thoth/vendor/tuxedo-wmi/src/tuxedo-wmi.c:23:
./include/linux/bug.h:37:45: error: negative width in bit-field ''
I tried to compile this on a system running a 4.12.12 kernel and got the following errors (which may or may not be related to the version of the kernel)
$ make make -C /lib/modules/4.12.12-gentoo/build M=/home/thoth/vendor/tuxedo-wmi/src modules make[1]: Entering directory '/usr/src/linux-4.12.12-gentoo' CC [M] /home/thoth/vendor/tuxedo-wmi/src/tuxedo-wmi.o In file included from ./include/linux/mmdebug.h:4:0, from ./include/linux/gfp.h:4, from ./include/linux/slab.h:14, from ./include/linux/resource_ext.h:19, from ./include/linux/acpi.h:26, from /home/thoth/vendor/tuxedo-wmi/src/tuxedo-wmi.c:23: ./include/linux/bug.h:37:45: error: negative width in bit-field ''
define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
./include/linux/kernel.h:872:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO' BUILD_BUG_ON_ZERO((perms) & 2) + \ ^
~~~~ ./include/linux/sysfs.h:102:12: note: in expansion of macro 'VERIFY_OCTAL_PERMISSIONS' .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \ ^~~~~~~~ /home/thoth/vendor/tuxedo-wmi/src/tuxedo-wmi.c:777:2: note: in expansion of macro 'ATTR' ATTR(kb_bl_state, 0666, kb_bl_state_show, kb_bl_state_store); ^~In file included from ./include/linux/kobject.h:21:0, from ./include/linux/device.h:17, from ./include/linux/acpi.h:27, from /home/thoth/vendor/tuxedo-wmi/src/tuxedo-wmi.c:23: /home/thoth/vendor/tuxedo-wmi/src/tuxedo-wmi.c:777:46: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] ATTR(kb_bl_state, 0666, kb_bl_state_show, kb_bl_state_store); ^ ./include/linux/sysfs.h:104:11: note: in definition of macro 'ATTR' .store = _store, \ ^~/home/thoth/vendor/tuxedo-wmi/src/tuxedo-wmi.c:777:46: note: (near initialization for 'kb_bl_state.store') ATTR(kb_bl_state, 0666, kb_bl_state_show, kb_bl_state_store); ^ ./include/linux/sysfs.h:104:11: note: in definition of macro 'ATTR' .store = _store, \ ^~cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:309: /home/thoth/vendor/tuxedo-wmi/src/tuxedo-wmi.o] Error 1 make[1]: [Makefile:1515: module/home/thoth/vendor/tuxedo-wmi/src] Error 2 make[1]: Leaving directory '/usr/src/linux-4.12.12-gentoo' make: *** [Makefile:6: all] Error 2gcc version 6.4.0 (Gentoo 6.4.0 p1.1)