X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fmissing.h;fp=src%2Fbasic%2Fmissing.h;h=36d9d10168f0d052e3967bbcc5c6d148bacf46e0;hb=d467286973adb99d5621c3d9a0942305e314d5dc;hp=848495ee26c890aae5008fe56e786acc45b2704d;hpb=d93949b9ea71babdcccbe98d33a9b9472ab2d08f;p=elogind.git diff --git a/src/basic/missing.h b/src/basic/missing.h index 848495ee2..36d9d1016 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -542,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