Make sure NULL is defined by including stddef.h
authorJim Meyering <jim@meyering.net>
Thu, 5 Sep 1996 02:48:41 +0000 (02:48 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 5 Sep 1996 02:48:41 +0000 (02:48 +0000)
(if STDC_HEADERS || _LIBC) or simply defining it (otherwise).
Include sys/types.h for definition of size_t needed by regex.h.

lib/rpmatch.c

index 55d3bba..65674b6 100644 (file)
@@ -21,9 +21,15 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #endif
 
 #if STDC_HEADERS || _LIBC
+# include <stddef.h>
 # include <stdlib.h>
+#else
+# ifndef NULL
+#  define NULL 0
+# endif
 #endif
 
+#include <sys/types.h>
 #include <regex.h>
 
 #if ENABLE_NLS