mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-05 22:43:24 +00:00
8f97f27620
PR: 18494 Submitted by: maintainer
20 lines
609 B
Plaintext
20 lines
609 B
Plaintext
--- indxbib/indxbib.cc.~2~ Wed Mar 8 00:23:35 2000
|
|
+++ indxbib/indxbib.cc Wed Mar 8 00:31:02 2000
|
|
@@ -222,10 +222,16 @@
|
|
else {
|
|
temp_index_file = strsave(TEMP_INDEX_TEMPLATE);
|
|
}
|
|
+#ifndef HAVE_MKSTEMP
|
|
if (!mktemp(temp_index_file) || !temp_index_file[0])
|
|
fatal("cannot create file name for temporary file");
|
|
+#endif
|
|
catch_fatal_signals();
|
|
+#ifdef HAVE_MKSTEMP
|
|
+ int fd = mkstemp(temp_index_file);
|
|
+#else
|
|
int fd = creat(temp_index_file, S_IRUSR|S_IRGRP|S_IROTH);
|
|
+#endif
|
|
if (fd < 0)
|
|
fatal("can't create temporary index file: %1", strerror(errno));
|
|
indxfp = fdopen(fd, "w");
|