From 03e9c88488dda0933d35e5c502db9a88deb62ab9 Mon Sep 17 00:00:00 2001 From: sg Date: Tue, 5 Apr 2016 21:04:06 +0200 Subject: [PATCH] fixed bug #47625 (Error in compilation of C++ source using netifapi macros) by changing NULL define for __cplusplus --- src/include/lwip/def.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/include/lwip/def.h b/src/include/lwip/def.h index 49571363..3bd0db84 100644 --- a/src/include/lwip/def.h +++ b/src/include/lwip/def.h @@ -53,8 +53,12 @@ extern "C" { #define LWIP_ARRAYSIZE(x) (sizeof(x)/sizeof((x)[0])) #ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else #define NULL ((void *)0) #endif +#endif /* Endianess-optimized shifting of two u8_t to create one u16_t */ #if BYTE_ORDER == LITTLE_ENDIAN