Skip to content

Commit e6b9559

Browse files
committed
ola: fix compilation with musl 1.2.3
Upstream sent patch. Signed-off-by: Rosen Penev <[email protected]> (cherry picked from commit e354674)
1 parent ea38786 commit e6b9559

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

net/ola/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
1010

1111
PKG_NAME:=ola
1212
PKG_VERSION:=0.10.8
13-
PKG_RELEASE:=3
13+
PKG_RELEASE:=4
1414

1515
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
1616
PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)?

net/ola/patches/030-musl-123.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 418b825ed98d84a5c781267df1e84c3819675d09 Mon Sep 17 00:00:00 2001
2+
From: Rosen Penev <[email protected]>
3+
Date: Tue, 12 Apr 2022 20:34:55 -0700
4+
Subject: [PATCH] ola: fix compilation with musl 1.2.3
5+
6+
musl 1.2.3 defines NULL as nullptr. Cannot use reinterpret_cast with nullptr.
7+
8+
No idea why this is even here. NULL in C == 0.
9+
---
10+
ola/AutoStart.cpp | 4 ----
11+
1 file changed, 4 deletions(-)
12+
13+
--- a/ola/AutoStart.cpp
14+
+++ b/ola/AutoStart.cpp
15+
@@ -110,11 +110,7 @@ TCPSocket *ConnectToServer(unsigned shor
16+
// Try to start the server, we pass --daemon (fork into background) and
17+
// --syslog (log to syslog).
18+
execlp("olad", "olad", "--daemon", "--syslog",
19+
-#ifdef __FreeBSD__
20+
reinterpret_cast<char*>(0));
21+
-#else
22+
- reinterpret_cast<char*>(NULL));
23+
-#endif // __FreeBSD__
24+
OLA_WARN << "Failed to exec: " << strerror(errno);
25+
_exit(1);
26+
}

0 commit comments

Comments
 (0)