From f10d151ae251c72ff21ffd1354ec111e4e314a31 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 14 Apr 2022 17:39:32 -0700 Subject: [PATCH] ola: fix compilation with musl 1.2.3 musl 1.2.3 defines NULL as nullptr. cannot use reinterpret_cast with nullptr. Signed-off-by: Rosen Penev --- ola/AutoStart.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ola/AutoStart.cpp b/ola/AutoStart.cpp index 89fa51f115..4dbe20d317 100644 --- a/ola/AutoStart.cpp +++ b/ola/AutoStart.cpp @@ -110,11 +110,11 @@ TCPSocket *ConnectToServer(unsigned short port) { // Try to start the server, we pass --daemon (fork into background) and // --syslog (log to syslog). execlp("olad", "olad", "--daemon", "--syslog", -#ifdef __FreeBSD__ - reinterpret_cast(0)); +#if __cplusplus >= 201103L + nullptr); #else reinterpret_cast(NULL)); -#endif // __FreeBSD__ +#endif // __cplusplus >= 201103L OLA_WARN << "Failed to exec: " << strerror(errno); _exit(1); }