$NetBSD: patch-ah,v 1.1 2008/03/08 01:10:27 gdt Exp $

Work around a problem linking to _environ in Mac OS X.

--- common-src/alloc.c.orig	2007-05-07 16:46:45.000000000 -0400
+++ common-src/alloc.c
@@ -37,6 +37,11 @@
 #define MIN_ALLOC 64
 static char *internal_vstralloc(const char *, va_list);
 
+#ifdef __APPLE__
+#include <crt_externs.h>
+#define environ (* _NSGetEnviron())
+#endif
+
 /*
  *=====================================================================
  * debug_caller_loc -- keep track of all allocation callers
