diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-11-08 12:54:05 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-11-08 12:54:05 +0200 |
commit | af0fe8255c46f3826f4a69b0006b02d62f640b88 (patch) | |
tree | d78c4882bb285b523cd6cb8e753a49d3deb86d32 | |
parent | 5320dcba034996397a7e9aa5efe04671109ce8fc (diff) | |
download | rpm-af0fe8255c46f3826f4a69b0006b02d62f640b88.tar.gz rpm-af0fe8255c46f3826f4a69b0006b02d62f640b88.tar.bz2 rpm-af0fe8255c46f3826f4a69b0006b02d62f640b88.zip |
Kludge around mktemp() uses to shut up build warnings
-rw-r--r-- | lib/rpmchecksig.c | 4 | ||||
-rw-r--r-- | lib/rpminstall.c | 4 |
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); } |