Add a patch to replace tmpnam with mkstemp.

Submitted by:	Samuel Tardieu <sam@ada.eu.org>
This commit is contained in:
Daniel Eischen 2002-02-12 23:43:24 +00:00
parent bf4bc8c5de
commit 55343ff4ae
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=54628

20
lang/gnat/files/patch-ap Normal file
View 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