summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac1
-rw-r--r--src/mkbuiltins2
-rw-r--r--src/parser.c3
4 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fe5d984..95e5140 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-26  Aleksey Cheusov <vle@gmx.net>
+
+	* Fixed build on NetBSD.
+
 2008-10-17  Herbert Xu <herbert@gondor.apana.org.au>
 
 	* Removed obsolete for loop syntax in manual.
diff --git a/configure.ac b/configure.ac
index 4d739c2..221b839 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,7 @@ AC_ARG_ENABLE(glob, AS_HELP_STRING(--enable-glob, [Use glob(3) from libc]))
 dnl Checks for libraries.
 
 dnl Checks for header files.
+AC_CHECK_HEADERS(alloca.h)
 
 dnl Checks for library functions.
 AC_CHECK_FUNCS(bsearch getpwnam getrlimit imaxdiv isalpha killpg mempcpy \
diff --git a/src/mkbuiltins b/src/mkbuiltins
index 960c61c..424d59a 100644
--- a/src/mkbuiltins
+++ b/src/mkbuiltins
@@ -37,7 +37,7 @@
 
 tempfile=tempfile
 if ! type tempfile > /dev/null 2>&1; then
-	tempfile=mktemp
+	tempfile='mktemp /tmp/mkbuiltins.XXXXXX'
 fi
 
 trap 'rm -f $temp $temp2' EXIT
diff --git a/src/parser.c b/src/parser.c
index e891d31..ab66f30 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -32,7 +32,10 @@
  * SUCH DAMAGE.
  */
 
+#if HAVE_ALLOCA_H
 #include <alloca.h>
+#endif
+
 #include <stdlib.h>
 
 #include "shell.h"