X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Fbasic%2Fmissing.h;h=e18995e870bec90a998337582ed595be1baa9678;hb=4a8b9253ee4cb0360eab07dc8da85fc38b2eb6bd;hp=37c3f6774549f63fc6c50a7b8d6cdb2fc8aa7c67;hpb=4ebadef69ff96e92122a133cfecadf60816c4fa3;p=elogind.git diff --git a/src/basic/missing.h b/src/basic/missing.h index 37c3f6774..e18995e87 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -37,6 +37,8 @@ #include #include +#include "musl_missing.h" + #ifdef ARCH_MIPS #include #endif @@ -135,6 +137,8 @@ static inline int pivot_root(const char *new_root, const char *put_old) { # define __NR_memfd_create 385 # elif defined __aarch64__ # define __NR_memfd_create 279 +# elif defined __s390__ +# define __NR_memfd_create 350 # elif defined _MIPS_SIM # if _MIPS_SIM == _MIPS_SIM_ABI32 # define __NR_memfd_create 4354 @@ -452,6 +456,10 @@ struct btrfs_ioctl_quota_ctl_args { #define BTRFS_FIRST_FREE_OBJECTID 256 #endif +#ifndef BTRFS_LAST_FREE_OBJECTID +#define BTRFS_LAST_FREE_OBJECTID -256ULL +#endif + #ifndef BTRFS_ROOT_TREE_OBJECTID #define BTRFS_ROOT_TREE_OBJECTID 1 #endif @@ -476,6 +484,10 @@ struct btrfs_ioctl_quota_ctl_args { #define BTRFS_QGROUP_LIMIT_KEY 244 #endif +#ifndef BTRFS_ROOT_BACKREF_KEY +#define BTRFS_ROOT_BACKREF_KEY 144 +#endif + #ifndef BTRFS_SUPER_MAGIC #define BTRFS_SUPER_MAGIC 0x9123683E #endif @@ -922,6 +934,14 @@ static inline int setns(int fd, int nstype) { #define LOOPBACK_IFINDEX 1 #endif +#if !HAVE_DECL_IFA_FLAGS +#define IFA_FLAGS 8 +#endif + +#ifndef IFA_F_NOPREFIXROUTE +#define IFA_F_NOPREFIXROUTE 0x200 +#endif + #ifndef MAX_AUDIT_MESSAGE_LENGTH #define MAX_AUDIT_MESSAGE_LENGTH 8970 #endif @@ -1005,3 +1025,26 @@ static inline int renameat2(int oldfd, const char *oldname, int newfd, const cha #ifndef RENAME_NOREPLACE #define RENAME_NOREPLACE (1 << 0) #endif + +#if !HAVE_DECL_KCMP +static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) { +#if defined(__NR_kcmp) + return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2); +#else + errno = ENOSYS; + return -1; +#endif +} +#endif + +#ifndef KCMP_FILE +#define KCMP_FILE 0 +#endif + +#ifndef INPUT_PROP_POINTING_STICK +#define INPUT_PROP_POINTING_STICK 0x05 +#endif + +#ifndef INPUT_PROP_ACCELEROMETER +#define INPUT_PROP_ACCELEROMETER 0x06 +#endif