summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch42
1 files changed, 0 insertions, 42 deletions
diff --git a/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch b/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch
deleted file mode 100644
index b8ab7c4e70..0000000000
--- a/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From f771407d3e0288ca0c06a894194d3ddad69b9a8e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:17:05 +0000
4Subject: [PATCH 07/11] util: Use mkostemp only if libc supports it
5
6Upstream-Status: Denied [no desire for uclibc support]
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 src/basic/util.c | 8 ++++++++
11 1 file changed, 8 insertions(+)
12
13diff --git a/src/basic/util.c b/src/basic/util.c
14index dc65280..72f4665 100644
15--- a/src/basic/util.c
16+++ b/src/basic/util.c
17@@ -97,6 +97,8 @@
18 #include "def.h"
19 #include "sparse-endian.h"
20
21+#include "config.h"
22+
23 int saved_argc = 0;
24 char **saved_argv = NULL;
25
26@@ -6682,7 +6684,13 @@ int mkostemp_safe(char *pattern, int flags) {
27
28 u = umask(077);
29
30+#ifdef HAVE_MKOSTEMP
31 fd = mkostemp(pattern, flags);
32+#else
33+ fd = mkstemp(pattern);
34+ if (fd >= 0) fcntl(fd, F_SETFD, flags);
35+#endif /* HAVE_MKOSTEMP */
36+
37 if (fd < 0)
38 return -errno;
39
40--
412.1.4
42