X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Ffileio.c;h=d60cd76208e9aa5a5a49977d90d35f8f39c70c7f;hb=14496a4c8353b9b7d14c6a3c5959ff989b2bea21;hp=88fd7d09436f7d6d52e8fd7e3650c16ef1815854;hpb=d467286973adb99d5621c3d9a0942305e314d5dc;p=elogind.git diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 88fd7d094..d60cd7620 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -1285,12 +1285,10 @@ int open_tmpfile_unlinkable(const char *directory, int flags) { /* Returns an unlinked temporary file that cannot be linked into the file system anymore */ -#ifdef O_TMPFILE /* Try O_TMPFILE first, if it is supported */ fd = open(directory, flags|O_TMPFILE|O_EXCL, S_IRUSR|S_IWUSR); if (fd >= 0) return fd; -#endif /* Fall back to unguessable name + unlinking */ p = strjoina(directory, "/systemd-tmp-XXXXXX"); @@ -1318,7 +1316,6 @@ int open_tmpfile_linkable(const char *target, int flags, char **ret_path) { * which case "ret_path" will be returned as NULL. If not possible a the tempoary path name used is returned in * "ret_path". Use link_tmpfile() below to rename the result after writing the file in full. */ -#ifdef O_TMPFILE { _cleanup_free_ char *dn = NULL; @@ -1334,7 +1331,6 @@ int open_tmpfile_linkable(const char *target, int flags, char **ret_path) { log_debug_errno(errno, "Failed to use O_TMPFILE on %s: %m", dn); } -#endif r = tempfn_random(target, NULL, &tmp); if (r < 0)