$NetBSD: patch-ac,v 1.4 2005/04/01 16:08:10 minskim Exp $

--- regex.c.orig	Wed Apr 19 11:58:00 1995
+++ regex.c
@@ -114,7 +114,7 @@ what you give them.   Help stamp out sof
  * Date :	 July 27, 1990
  */
 
-#ifndef NeXT
+#if !defined(NeXT) && !defined(__APPLE__)
 #include <malloc.h>
 #endif
 #include <string.h>
@@ -122,7 +122,7 @@ what you give them.   Help stamp out sof
 #include <stdlib.h>
 #include <assert.h>
 
-#ifdef sparc
+#if defined(sparc) && !defined(__NetBSD__)
 #include <alloca.h>
 #else
 #pragma alloca
