Skip to content

Commit

Permalink
ola: fix compilation with musl 1.2.3
Browse files Browse the repository at this point in the history
musl 1.2.3 defines NULL as nullptr. cannot use reinterpret_cast with
nullptr.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb authored and kripton committed Mar 27, 2024
1 parent 0b27b6e commit f10d151
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ola/AutoStart.cpp
Expand Up @@ -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<char*>(0));
#if __cplusplus >= 201103L
nullptr);
#else
reinterpret_cast<char*>(NULL));
#endif // __FreeBSD__
#endif // __cplusplus >= 201103L
OLA_WARN << "Failed to exec: " << strerror(errno);
_exit(1);
}
Expand Down

0 comments on commit f10d151

Please sign in to comment.