iptables: bump to version 1.6.1
[buildroot-gz.git] / package / uclibc / 0001-add-init_module-delete_module-syscall-wrappers.patch
blob4a3e07fb5d47d737a0ed410cd4201a30bebf6afe
1 From f60f9d6f1f73ab3f77771dafa4f90c2e0de2a7e2 Mon Sep 17 00:00:00 2001
2 From: Waldemar Brodkorb <wbx@uclibc-ng.org>
3 Date: Tue, 27 Dec 2016 09:24:24 +0100
4 Subject: [PATCH] add init_module/delete_module syscall wrappers
6 Add the wrappers unconditionally, because kmod package
7 still uses them.
9 Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
10 ---
11 libc/sysdeps/linux/common/Makefile.in | 1 +
12 libc/sysdeps/linux/common/module.c | 23 +++++++++++++++++++++++
13 2 files changed, 24 insertions(+)
14 create mode 100644 libc/sysdeps/linux/common/module.c
16 diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
17 index 595074c..faed6fd 100644
18 --- a/libc/sysdeps/linux/common/Makefile.in
19 +++ b/libc/sysdeps/linux/common/Makefile.in
20 @@ -31,6 +31,7 @@ CSRC-$(UCLIBC_LINUX_SPECIFIC) += \
21 ioperm.c \
22 iopl.c \
23 modify_ldt.c \
24 + module.c \
25 personality.c \
26 pipe2.c \
27 ppoll.c \
28 diff --git a/libc/sysdeps/linux/common/module.c b/libc/sysdeps/linux/common/module.c
29 new file mode 100644
30 index 0000000..146a43e
31 --- /dev/null
32 +++ b/libc/sysdeps/linux/common/module.c
33 @@ -0,0 +1,23 @@
34 +/*
35 + * init_module()/delete_module() for uClibc
36 + *
37 + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
38 + *
39 + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
40 + */
42 +#include <sys/syscall.h>
44 +#ifdef __NR_init_module
45 +int init_module(void *first, void *second, void *third, void *fourth, void *fifth);
46 +/* This may have 5 arguments (for old 2.0 kernels) or 2 arguments
47 + * (for 2.2 and 2.4 kernels). Use the greatest common denominator,
48 + * and let the kernel cope with whatever it gets. It's good at that. */
49 +_syscall5(int, init_module, void *, first, void *, second, void *, third,
50 + void *, fourth, void *, fifth)
51 +#endif
53 +#ifdef __NR_delete_module
54 +int delete_module(const char *name, unsigned int flags);
55 +_syscall2(int, delete_module, const char *, name, unsigned int, flags)
56 +#endif
57 --
58 2.1.4