From 762c8983903ae86a24e411af85f0f3f28c8c9d5c Mon Sep 17 00:00:00 2001 From: Christian Holm Christensen Date: Tue, 14 Nov 2023 09:40:30 +0100 Subject: [PATCH] Update kernel.h for MacOSX MacOSX defines the `PREALLOCATE` as a macro in the header `vnode.h` which causes compilation problems with at least `AliceO2`. The proposed change `undef`ines the macro if defined so that the name `PREALLOCATE` may be used as an identifier here. --- cpp/src/arrow/compute/kernel.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cpp/src/arrow/compute/kernel.h b/cpp/src/arrow/compute/kernel.h index d8960308dff1..44c71898a171 100644 --- a/cpp/src/arrow/compute/kernel.h +++ b/cpp/src/arrow/compute/kernel.h @@ -406,6 +406,15 @@ struct NullHandling { }; }; +// BEGIN_ALICE change +// MacOSX defines `PREALLOCATE` as a macro in the header `vnode.h`. +// Thus, we must undefine that here to have a valid identifier. +// A bug report against upstream code should be made. +#if defined(__APPLE__) && defined(PREALLOCATE) +# undef PREALLOCATE +#endif +// END_ALICE change + /// \brief The preference for memory preallocation of fixed-width type outputs /// in kernel execution. struct MemAllocation {