From 03f7dfb868b33ee73f2b1e36ab4a1bfa440dcd2c Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Sat, 11 May 2013 00:50:32 -0300 Subject: [PATCH] Revert "missing: Don't call syscall() with syscallno == -1" This reverts commit 38829712e5c411bc250aeae142fc6bf06e794d58. It fixes the problem, but it breaks the testsuite for those who don't have __NR_finit_module. The testsuite would have to make the same check. Instead, I'm reverting this change and I'm going to apply another patch from Jan Luebbe who got this right from the beginning. --- libkmod/missing.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libkmod/missing.h b/libkmod/missing.h index b31af845..edb88b9f 100644 --- a/libkmod/missing.h +++ b/libkmod/missing.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include @@ -16,14 +15,13 @@ # define MODULE_INIT_IGNORE_VERMAGIC 2 #endif +#ifndef __NR_finit_module +# define __NR_finit_module -1 +#endif + #ifndef HAVE_FINIT_MODULE static inline int finit_module(int fd, const char *uargs, int flags) { -#ifndef __NR_finit_module - errno = ENOSYS; - return -1; -#else return syscall(__NR_finit_module, fd, uargs, flags); -#endif } #endif -- 2.47.2