From: Stephane Glondu Date: Thu, 7 Nov 2013 15:06:57 +0000 (+0100) Subject: Enable mkstemp in yacc X-Git-Tag: archive/raspbian/4.02.3-10+rpi1~2^2^2^2^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=68de39fc9a884ae0c0b2fa06151a2eb5b71a2a3f;p=ocaml.git Enable mkstemp in yacc Use the feature test macro found in the mkstemp(3) manpage. Bug: http://caml.inria.fr/mantis/view.php?id=6232 Gbp-Pq: Name 0011-Enable-mkstemp-in-yacc.patch --- diff --git a/yacc/main.c b/yacc/main.c index f6cac60d..66b63ec0 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