Enable mkstemp in yacc
authorStephane Glondu <steph@glondu.net>
Thu, 7 Nov 2013 15:09:38 +0000 (16:09 +0100)
committerStephane Glondu <steph@glondu.net>
Thu, 7 Nov 2013 15:48:31 +0000 (16:48 +0100)
debian/patches/0011-Enable-mkstemp-in-yacc.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0011-Enable-mkstemp-in-yacc.patch b/debian/patches/0011-Enable-mkstemp-in-yacc.patch
new file mode 100644 (file)
index 0000000..c2919e7
--- /dev/null
@@ -0,0 +1,26 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Thu, 7 Nov 2013 16:06:57 +0100
+Subject: Enable mkstemp in yacc
+
+Use the feature test macro found in the mkstemp(3) manpage.
+---
+ yacc/main.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/yacc/main.c b/yacc/main.c
+index f6cac60..66b63ec 100644
+--- a/yacc/main.c
++++ b/yacc/main.c
+@@ -57,6 +57,11 @@ char *verbose_file_name;
+ #define HAVE_MKSTEMP
+ #endif
++#if _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 \
++  || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE >= 200112L
++#define HAVE_MKSTEMP
++#endif
++
+ #ifdef HAVE_MKSTEMP
+ int action_fd = -1, entry_fd = -1, text_fd = -1, union_fd = -1;
+ #endif
+-- 
index ac2d26f86b7e272761d53ad99a265c6aadb1bd8b..a47d64c0982ccc39ccceb47bcc561f9477c781a1 100644 (file)
@@ -8,3 +8,4 @@
 0008-Embed-bytecode-in-C-object-when-using-custom.patch
 0009-Fix-typos-and-other-wording-issues.patch
 0010-Add-const-qualifiers-in-Tcl-Tk-bindings.patch
+0011-Enable-mkstemp-in-yacc.patch