Add a patch to replace tmpnam with mkstemp.
Submitted by: Samuel Tardieu <sam@ada.eu.org>
This commit is contained in:
parent
bf4bc8c5de
commit
55343ff4ae
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=54628
1 changed files with 20 additions and 0 deletions
20
lang/gnat/files/patch-ap
Normal file
20
lang/gnat/files/patch-ap
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- ada/a-adaint.c.orig Tue Feb 12 17:24:15 2002
|
||||
+++ ada/a-adaint.c Tue Feb 12 17:21:56 2002
|
||||
@@ -590,6 +590,17 @@
|
||||
strcpy (tmp_filename, pname);
|
||||
free (pname);
|
||||
}
|
||||
+#elif defined (__FreeBSD__)
|
||||
+ {
|
||||
+ int fd;
|
||||
+
|
||||
+ strcpy (tmp_filename, "/tmp/gnat-XXXXXX");
|
||||
+ fd = mkstemp (tmp_filename);
|
||||
+ if (fd < 0)
|
||||
+ strcpy (tmp_filename, "");
|
||||
+ else
|
||||
+ close (fd);
|
||||
+ }
|
||||
#else
|
||||
tmpnam (tmp_filename);
|
||||
#endif
|
Loading…
Reference in a new issue