summaryrefslogtreecommitdiff
path: root/package/util-linux/patches/patch-lib_fileutils_c
blob: d4edf1c6af7a719824217d466be3ee790635a228 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- util-linux-2.23.2.orig/lib/fileutils.c	2013-06-13 09:46:10.000000000 +0200
+++ util-linux-2.23.2/lib/fileutils.c	2013-08-14 11:58:47.000000000 +0200
@@ -37,7 +37,11 @@ int xmkstemp(char **tmpname, char *dir)
 		xasprintf(&localtmp, "%s/%s.XXXXXX", _PATH_TMP,
 			  program_invocation_short_name);
 	old_mode = umask(077);
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
 	fd = mkostemp(localtmp, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC);
+#else
+	fd = mkstemp(localtmp);
+#endif
 	umask(old_mode);
 	if (fd == -1) {
 		free(localtmp);