summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rpmchecksig.c4
-rw-r--r--lib/rpminstall.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c
index a18baf2b0..3b6ba1984 100644
--- a/lib/rpmchecksig.c
+++ b/lib/rpmchecksig.c
@@ -328,7 +328,11 @@ static int rpmReSign(rpmts ts,
/* Write the lead/signature of the output rpm */
strcpy(tmprpm, rpm);
strcat(tmprpm, ".XXXXXX");
+#if defined(HAVE_MKSTEMP)
+ (void) close(mkstemp(tmprpm));
+#else
(void) mktemp(tmprpm);
+#endif
trpm = tmprpm;
if (manageFile(&ofd, &trpm, O_WRONLY|O_CREAT|O_TRUNC, 0))
diff --git a/lib/rpminstall.c b/lib/rpminstall.c
index af55a5e11..af38ca50d 100644
--- a/lib/rpminstall.c
+++ b/lib/rpminstall.c
@@ -369,7 +369,11 @@ if (fileURL[0] == '=') {
if (!(rootDir && * rootDir))
rootDir = "";
strcpy(tfnbuf, "rpm-xfer.XXXXXX");
+#if defined(HAVE_MKSTEMP)
+ (void) close(mkstemp(tfnbuf));
+#else
(void) mktemp(tfnbuf);
+#endif
tfn = rpmGenPath(rootDir, "%{_tmppath}/", tfnbuf);
}