Commit ab5442de authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

memfd: Test for __NR_memfd_create during building

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 36aedc3b
...@@ -41,6 +41,9 @@ endif ...@@ -41,6 +41,9 @@ endif
ifeq ($(call try-cc,$(SETPROCTITLE_INIT_TEST),-lbsd),y) ifeq ($(call try-cc,$(SETPROCTITLE_INIT_TEST),-lbsd),y)
$(Q) @echo '#define CONFIG_HAS_SETPROCTITLE_INIT' >> $@ $(Q) @echo '#define CONFIG_HAS_SETPROCTITLE_INIT' >> $@
endif endif
ifeq ($(call try-cc,$(MEMFD_TEST),),y)
$(Q) @echo '#define CONFIG_HAS_MEMFD' >> $@
endif
ifeq ($(piegen-y),y) ifeq ($(piegen-y),y)
$(Q) @echo '#define CONFIG_PIEGEN' >> $@ $(Q) @echo '#define CONFIG_PIEGEN' >> $@
endif endif
......
...@@ -92,3 +92,17 @@ int main(int argc, char *argv[], char *envp[]) ...@@ -92,3 +92,17 @@ int main(int argc, char *argv[], char *envp[])
} }
endef endef
define MEMFD_TEST
#include <unistd.h>
#include <sys/syscall.h>
int main(void)
{
#ifdef __NR_memfd_create
return 0;
#endif
}
endef
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment