mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
missing: add fsmount() syscall fallback definition
This commit is contained in:
parent
2208d96623
commit
34a9da0d8e
@ -629,6 +629,7 @@ foreach ident : [
|
|||||||
['open_tree', '''#include <sys/mount.h>'''],
|
['open_tree', '''#include <sys/mount.h>'''],
|
||||||
['fsopen', '''#include <sys/mount.h>'''],
|
['fsopen', '''#include <sys/mount.h>'''],
|
||||||
['fsconfig', '''#include <sys/mount.h>'''],
|
['fsconfig', '''#include <sys/mount.h>'''],
|
||||||
|
['fsmount', '''#include <sys/mount.h>'''],
|
||||||
['getdents64', '''#include <dirent.h>'''],
|
['getdents64', '''#include <dirent.h>'''],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -609,6 +609,26 @@ static inline int missing_fsconfig(int fd, unsigned cmd, const char *key, const
|
|||||||
|
|
||||||
/* ======================================================================= */
|
/* ======================================================================= */
|
||||||
|
|
||||||
|
#if !HAVE_FSMOUNT
|
||||||
|
|
||||||
|
#ifndef FSMOUNT_CLOEXEC
|
||||||
|
#define FSMOUNT_CLOEXEC 0x00000001
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static inline int missing_fsmount(int fd, unsigned flags, unsigned ms_flags) {
|
||||||
|
# if defined __NR_fsmount && __NR_fsmount >= 0
|
||||||
|
return syscall(__NR_fsmount, fd, flags, ms_flags);
|
||||||
|
# else
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
|
# define fsmount missing_fsmount
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ======================================================================= */
|
||||||
|
|
||||||
#if !HAVE_GETDENTS64
|
#if !HAVE_GETDENTS64
|
||||||
|
|
||||||
static inline ssize_t missing_getdents64(int fd, void *buffer, size_t length) {
|
static inline ssize_t missing_getdents64(int fd, void *buffer, size_t length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user