diff options
author | Rob Landley <rob@landley.net> | 2016-03-01 23:41:01 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-03-01 23:41:01 -0600 |
commit | dfc44f12d7de952a5aec0c7a4141b609d18cd034 (patch) | |
tree | cd3348e0b48ee766a785b8a6b2443b988350bf35 /toys/other | |
parent | 86f7c048254eab34d78ff105b54a5d31ec6ee9d3 (diff) | |
download | toybox-dfc44f12d7de952a5aec0c7a4141b609d18cd034.tar.gz |
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.
Diffstat (limited to 'toys/other')
-rw-r--r-- | toys/other/insmod.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 <sys/syscall.h> +#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) |