Subject: bug#63244: barrier build fails due to NULL not defined

From: [email-masked]
Date: Tue, 02 May 2023 21:49:53 -0400

Can add -DNULL=nullptr I guess?

cd /tmp/guix-build-barrier-2.4.0.drv-0/build/src/lib/io && /gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0/bin/c++ -DBARRIER_BUILD_DATE=\"19700101\" -DBARRIER_BUILD_NUMBER=1 -DBARRIER
_REVISION=\"00000000\" -DBARRIER_VERSION=\"2.4.0-release\" -DBARRIER_VERSION_MAJOR=2 -DBARRIER_VERSION_MINOR=4 -DBARRIER_VERSION_PATCH=0 -DBARRIER_VERSION_STRING=\"2.4.0-release-release\" -D
HAVE_CONFIG_H -DNDEBUG -DSYSAPI_UNIX=1 -DWINAPI_XWINDOWS=1 -I/tmp/guix-build-barrier-2.4.0.drv-0/source/ext/gulrak-filesystem/include -I/tmp/guix-build-barrier-2.4.0.drv-0/source/src/./lib -
I/tmp/guix-build-barrier-2.4.0.drv-0/build/src/lib -isystem /gnu/store/bvc7jfm2pkxf3yn2v50a761amz7w43iz-avahi-0.8/include/avahi-compat-libdns_sd -O2 -g -DNDEBUG -fPIC -std=c++14 -MD -MT src/
lib/io/CMakeFiles/io.dir/StreamBuffer.cpp.o -MF CMakeFiles/io.dir/StreamBuffer.cpp.o.d -o CMakeFiles/io.dir/StreamBuffer.cpp.o -c /tmp/guix-build-barrier-2.4.0.drv-0/source/src/lib/io/Stream
Buffer.cpp
In file included from /tmp/guix-build-barrier-2.4.0.drv-0/source/src/./lib/base/EventTypes.h:20,
                 from /tmp/guix-build-barrier-2.4.0.drv-0/source/src/./lib/io/StreamBuffer.h:21,
                 from /tmp/guix-build-barrier-2.4.0.drv-0/source/src/lib/io/StreamBuffer.cpp:19:
/tmp/guix-build-barrier-2.4.0.drv-0/source/src/./lib/base/Event.h:63:37: error: ���NULL��� was not declared in this scope
   63 |     Event(Type type, void* target = NULL, void* data = NULL,
      |                                     ^~~~
/tmp/guix-build-barrier-2.4.0.drv-0/source/src/./lib/base/Event.h:23:1: note: ���NULL��� is defined in header ���<cstddef>���; did you forget to ���#include <cstddef>���?
   22 | #include "common/stdmap.h"
  +++ |+#include <cstddef>
   23 | 
/tmp/guix-build-barrier-2.4.0.drv-0/source/src/./lib/base/Event.h:63:56: error: ���NULL��� was not declared in this scope
   63 |     Event(Type type, void* target = NULL, void* data = NULL,
      |                                                        ^~~~
/tmp/guix-build-barrier-2.4.0.drv-0/source/src/./lib/base/Event.h:63:56: note: ���NULL��� is defined in header ���<cstddef>���; did you forget to ���#include <cstddef>���?
/tmp/guix-build-barrier-2.4.0.drv-0/source/src/lib/io/StreamBuffer.cpp: In member function ���const void* StreamBuffer::peek(UInt32)���:
/tmp/guix-build-barrier-2.4.0.drv-0/source/src/lib/io/StreamBuffer.cpp:49:16: error: ���NULL��� was not declared in this scope
   49 |         return NULL;
      |                ^~~~
/tmp/guix-build-barrier-2.4.0.drv-0/source/src/lib/io/StreamBuffer.cpp:26:1: note: ���NULL��� is defined in header ���<cstddef>���; did you forget to ���#include <cstddef>���?
   25 | #include <cassert>
  +++ |+#include <cstddef>
   26 |