From dfc44f12d7de952a5aec0c7a4141b609d18cd034 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 1 Mar 2016 23:41:01 -0600 Subject: SYS_finit_module isn't there on Ubuntu 12.04 because it was only added to the 3.8 kernel in 2012. That's way too new to assume the build environment has it, so #ifdef and simulate a failure if it's not there. --- toys/other/insmod.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'toys') diff --git a/toys/other/insmod.c b/toys/other/insmod.c index 098d2cfa..18ac9176 100644 --- a/toys/other/insmod.c +++ b/toys/other/insmod.c @@ -16,7 +16,11 @@ config INSMOD #include "toys.h" #include +#ifdef SYS_finit_module #define finit_module(fd, opts, flags) syscall(SYS_finit_module, fd, opts, flags) +#else +#define finit_module(a, b, c) (errno = ENOSYS) +#endif #define init_module(mod, len, opts) syscall(SYS_init_module, mod, len, opts) void insmod_main(void) -- cgit v1.2.3