Skip to content

Commit eb31017

Browse files
committed
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 <[email protected]>
1 parent d1433a1 commit eb31017

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ola/AutoStart.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ TCPSocket *ConnectToServer(unsigned short port) {
110110
// Try to start the server, we pass --daemon (fork into background) and
111111
// --syslog (log to syslog).
112112
execlp("olad", "olad", "--daemon", "--syslog",
113-
#ifdef __FreeBSD__
114-
reinterpret_cast<char*>(0));
113+
#if __cplusplus >= 201103L
114+
nullptr);
115115
#else
116116
reinterpret_cast<char*>(NULL));
117-
#endif // __FreeBSD__
117+
#endif // __cplusplus >= 201103L
118118
OLA_WARN << "Failed to exec: " << strerror(errno);
119119
_exit(1);
120120
}

0 commit comments

Comments
 (0)