summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/prefix.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/prefix.cpp b/src/prefix.cpp
index 99e20171f..126d16a72 100644
--- a/src/prefix.cpp
+++ b/src/prefix.cpp
@@ -44,8 +44,11 @@ extern "C" {
#endif /* __cplusplus */
-#undef NULL
-#define NULL ((void *) 0)
+ // Why is NULL being redefined?! This breaks compilation on Windows, as it disables the safe assignment of NULL to other pointer types.
+#ifndef __WIN32__
+# undef NULL
+# define NULL ((void *) 0)
+#endif
#ifdef __GNUC__
#define br_return_val_if_fail(expr,val) if (!(expr)) {fprintf (stderr, "** BinReloc (%s): assertion %s failed\n", __PRETTY_FUNCTION__, #expr); return val;}