This checks `selinux_state` and `current_sid` supports in a raw way. Feels more reliable than the version checks. Supersedes #401, fixes #280, fixes #400.
16 lines
668 B
Makefile
16 lines
668 B
Makefile
obj-y += selinux.o
|
|
obj-y += sepolicy.o
|
|
obj-y += rules.o
|
|
|
|
ifeq ($(shell grep -q " current_sid(void)" $(srctree)/security/selinux/include/objsec.h; echo $$?),0)
|
|
ccflags-y += -DKSU_COMPAT_HAS_CURRENT_SID
|
|
endif
|
|
|
|
ifeq ($(shell grep -q "struct selinux_state " $(srctree)/security/selinux/include/security.h; echo $$?),0)
|
|
ccflags-y += -DKSU_COMPAT_HAS_SELINUX_STATE
|
|
endif
|
|
|
|
ccflags-y += -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-int-conversion
|
|
ccflags-y += -Wno-macro-redefined -Wno-declaration-after-statement -Wno-unused-function
|
|
ccflags-y += -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
|
|
ccflags-y += -I$(objtree)/security/selinux
|