summaryrefslogtreecommitdiff
path: root/emulators/gxemul/patches/patch-configure
blob: 744dd46e6db100761c7415a79509cb0b6312c7ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-configure,v 1.1 2012/07/16 00:19:14 abs Exp $

Fix the check to pickup mkstemp() on at least NetBSD

--- configure.orig	2012-07-15 22:26:52.000000000 +0000
+++ configure
@@ -705,7 +705,8 @@ rm -f _tests.cc _tests.o _tests
 #  mkstemp missing?
 printf "checking for mkstemp... "
 printf "#include <unistd.h>
-int main(int argc, char *argv[]) { int x; char *y = \"abc\";
+#include <stdlib.h>
+int main(int argc, char *argv[]) { int x; char y[4] = \"abc\";
 x = mkstemp(y); return 0;}\n" > _tests.cc
 $CXX $CXXFLAGS _tests.cc -o _tests 2> /dev/null
 if [ ! -x _tests ]; then