X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fmissing.h;h=36d9d10168f0d052e3967bbcc5c6d148bacf46e0;hb=26a2fa65615e047ee5f1ceb24e19aa3548e3a033;hp=c33439ddea8cf48af702d80570e6e42c676b0ac6;hpb=1b4ba40d8ccab6a88013d7453e9ded91688934c8;p=elogind.git diff --git a/src/basic/missing.h b/src/basic/missing.h index c33439dde..36d9d1016 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -38,6 +38,7 @@ #include #include +/// Additional includes needed by elogind #include "musl_missing.h" #ifdef HAVE_AUDIT @@ -441,7 +442,6 @@ struct btrfs_ioctl_quota_ctl_args { #endif #endif // 0 - #ifndef CGROUP_SUPER_MAGIC #define CGROUP_SUPER_MAGIC 0x27e0eb #endif @@ -450,6 +450,10 @@ struct btrfs_ioctl_quota_ctl_args { #define CGROUP2_SUPER_MAGIC 0x63677270 #endif +#ifndef CLONE_NEWCGROUP +#define CLONE_NEWCGROUP 0x02000000 +#endif + #ifndef TMPFS_MAGIC #define TMPFS_MAGIC 0x01021994 #endif @@ -538,12 +542,21 @@ struct btrfs_ioctl_quota_ctl_args { # define DRM_IOCTL_DROP_MASTER _IO('d', 0x1f) #endif -#if defined(__i386__) || defined(__x86_64__) - -/* The precise definition of __O_TMPFILE is arch specific, so let's - * just define this on x86 where we know the value. */ +/* The precise definition of __O_TMPFILE is arch specific; use the + * values defined by the kernel (note: some are hexa, some are octal, + * duplicated as-is from the kernel definitions): + * - alpha, parisc, sparc: each has a specific value; + * - others: they use the "generic" value. + */ #ifndef __O_TMPFILE +#if defined(__alpha__) +#define __O_TMPFILE 0100000000 +#elif defined(__parisc__) || defined(__hppa__) +#define __O_TMPFILE 0400000000 +#elif defined(__sparc__) || defined(__sparc64__) +#define __O_TMPFILE 0x2000000 +#else #define __O_TMPFILE 020000000 #endif @@ -582,6 +595,9 @@ struct btrfs_ioctl_quota_ctl_args { #define IN6_ADDR_GEN_MODE_EUI64 0 #define IN6_ADDR_GEN_MODE_NONE 1 +#endif + +#if !HAVE_DECL_IN6_ADDR_GEN_MODE_STABLE_PRIVACY #define IN6_ADDR_GEN_MODE_STABLE_PRIVACY 2 #endif @@ -987,11 +1003,13 @@ struct btrfs_ioctl_quota_ctl_args { #ifndef INPUT_PROP_ACCELEROMETER #define INPUT_PROP_ACCELEROMETER 0x06 #endif +#endif // 0 #ifndef HAVE_KEY_SERIAL_T typedef int32_t key_serial_t; #endif +#if 0 /// UNNEEDED by elogind #ifndef KEYCTL_READ #define KEYCTL_READ 11 #endif