chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-dhcp-lease: use shared default prefixlen function
[elogind.git]
/
src
/
shared
/
missing.h
diff --git
a/src/shared/missing.h
b/src/shared/missing.h
index 5b87e23eec311d6d34b3693de361a25a09c3055d..0d7c55952ee3f885ecf8c0cd3121c1dfd40ce374 100644
(file)
--- a/
src/shared/missing.h
+++ b/
src/shared/missing.h
@@
-74,7
+74,11
@@
#endif
#ifndef MFD_ALLOW_SEALING
#endif
#ifndef MFD_ALLOW_SEALING
-#define MFD_ALLOW_SEALING 0x0002ULL
+#define MFD_ALLOW_SEALING 0x0002U
+#endif
+
+#ifndef MFD_CLOEXEC
+#define MFD_CLOEXEC 0x0001U
#endif
#ifndef IP_FREEBIND
#endif
#ifndef IP_FREEBIND
@@
-115,21
+119,15
@@
static inline int pivot_root(const char *new_root, const char *put_old) {
}
#endif
}
#endif
-#if
def __x86_64__
-# if
ndef __NR_memfd_create
+#if
ndef __NR_memfd_create
+# if
defined __x86_64__
# define __NR_memfd_create 319
# define __NR_memfd_create 319
-# endif
-#elif defined __arm__
-# ifndef __NR_memfd_create
+# elif defined __arm__
# define __NR_memfd_create 385
# define __NR_memfd_create 385
-# endif
-#elif defined _MIPS_SIM
-# ifndef __NR_memfd_create
+# elif defined _MIPS_SIM
# warning "__NR_memfd_create not yet defined for MIPS"
# define __NR_memfd_create 0xffffffff
# warning "__NR_memfd_create not yet defined for MIPS"
# define __NR_memfd_create 0xffffffff
-# endif
-#else
-# ifndef __NR_memfd_create
+# else
# define __NR_memfd_create 356
# endif
#endif
# define __NR_memfd_create 356
# endif
#endif
@@
-142,7
+140,7
@@
static inline int memfd_create(const char *name, unsigned int flags) {
#ifndef __NR_getrandom
# if defined __x86_64__
#ifndef __NR_getrandom
# if defined __x86_64__
-# define __NR_getrandom
27
8
+# define __NR_getrandom
31
8
# else
# warning "__NR_getrandom unknown for your architecture"
# define __NR_getrandom 0xffffffff
# else
# warning "__NR_getrandom unknown for your architecture"
# define __NR_getrandom 0xffffffff
@@
-155,6
+153,14
@@
static inline int getrandom(void *buffer, size_t count, unsigned flags) {
}
#endif
}
#endif
+#ifndef GRND_NONBLOCK
+#define GRND_NONBLOCK 0x0001
+#endif
+
+#ifndef GRND_RANDOM
+#define GRND_RANDOM 0x0002
+#endif
+
#ifndef BTRFS_IOCTL_MAGIC
#define BTRFS_IOCTL_MAGIC 0x94
#endif
#ifndef BTRFS_IOCTL_MAGIC
#define BTRFS_IOCTL_MAGIC 0x94
#endif
@@
-426,7
+432,7
@@
static inline int setns(int fd, int nstype) {
#define IFLA_BOND_AD_INFO 23
#define __IFLA_BOND_MAX 24
#define IFLA_BOND_AD_INFO 23
#define __IFLA_BOND_MAX 24
-#define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1)
+#define IFLA_BOND_MAX
(__IFLA_BOND_MAX - 1)
#endif
#if !HAVE_DECL_IFLA_VLAN_PROTOCOL
#endif
#if !HAVE_DECL_IFLA_VLAN_PROTOCOL