summaryrefslogtreecommitdiff
path: root/net/amule/patches/patch-ab
blob: 11652261fc47674603b4360f66a299a7ff0a3193 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$NetBSD: patch-ab,v 1.3 2005/03/16 19:06:10 rillig Exp $

The C++ standard library headers sometimes include <_G_config.h>, which
undefines the NULL macro and includes <stddef.h> afterwards. But if the
<stddef.h> header had been included once before, the GNU C preprocessor
doesn't include it a second time.

--- src/sys.h.orig	Sun Jun 13 17:37:06 2004
+++ src/sys.h	Wed Mar 16 19:40:44 2005
@@ -23,6 +23,11 @@
 #ifndef SYS_H
 #define SYS_H
 
+/* This is needed to have a NULL macro */
+#if defined(__NetBSD__) && defined(__GNUC__) && ((__GNUC__) < 3)
+# include <stl_config.h>
+#endif
+
 //
 // The build system forgets to add the correct CXXFLAGS (like for
 // example -pthread for g++).  Therefore define this here instead.