libc-wrapper: introduce a tiny libc wrapper
Then, move syscall definitions to the wrapper, and prototypes are moved to relevant headers. This also adds checks for add_key() and request_key(), as one day glibc may be going to add some of them separatedly. The check for fspick in meson.build is dropped, as it is currently unused in our code. This also moves - basic/missing_bpf.h -> include/override/linux/bpf.h, - basic/missing_keyctl.h -> include/override/linux/keyctl.h.
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
#include "iovec-util.h"
|
||||
#include "keyring-util.h"
|
||||
#include "log.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "nulstr-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-lookup.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/bpf_insn.h>
|
||||
#include <sys/bpf.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
@@ -14,7 +15,6 @@
|
||||
#include "fdset.h"
|
||||
#include "log.h"
|
||||
#include "memory-util.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
#include "serialize.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <linux/ioprio.h> /* IWYU pragma: export */
|
||||
#include <sys/ioprio.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
|
||||
|
||||
@@ -360,7 +360,8 @@ libshared = shared_library(
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libshared_sym_path],
|
||||
link_depends : libshared_sym_path,
|
||||
link_whole : [libshared_static,
|
||||
link_whole : [libc_wrapper_static,
|
||||
libshared_static,
|
||||
libbasic_static,
|
||||
libsystemd_static],
|
||||
dependencies : [libshared_deps,
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "hashmap.h"
|
||||
#include "libmount-util.h"
|
||||
#include "log.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "mkdir-label.h"
|
||||
#include "mount-util.h"
|
||||
#include "mountpoint-util.h"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "log.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "numa-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "stdio-util.h"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <sys/mempolicy.h>
|
||||
|
||||
#include "cpu-set-util.h"
|
||||
#include "forward.h"
|
||||
#include "missing_syscall.h"
|
||||
|
||||
static inline bool mpol_is_valid(int t) {
|
||||
return t >= MPOL_DEFAULT && t <= MPOL_LOCAL;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "chattr-util.h"
|
||||
#include "device-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "quota-util.h"
|
||||
|
||||
int quotactl_fd_with_fallback(int fd, int cmd, int id, void *addr) {
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "mkdir-label.h"
|
||||
#include "mount-util.h"
|
||||
#include "mountpoint-util.h"
|
||||
|
||||
Reference in New Issue
Block a user