From 368a9c7c61f8144eca48b12c5aac82b6a1d8c6bf Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 12 Jul 2023 13:45:07 +0800 Subject: Undefine NULL before defining it to 0 on FreeBSD Since C++11, NULL is promoted to nullptr on some BSD platforms. This is very problematic when used with Boost. At times it would fail during compile-time. What's worse is if it passes compile-time, but then crash during run-time, for example when some condition is to be checked for its truth, when then it would be compared to a nullptr. --- indra/llcommon/stdtypes.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h index bae4d7a5b1..86af192a94 100644 --- a/indra/llcommon/stdtypes.h +++ b/indra/llcommon/stdtypes.h @@ -114,6 +114,10 @@ typedef U32 TPACKETID; #define FALSE (0) #endif +#if LL_FREEBSD +#undef NULL +#endif + #ifndef NULL #define NULL (0) #endif -- cgit v1.2.3