From e6b95596ba291f02c7bc9289da9f296409729a77 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 12 Apr 2022 20:35:59 -0700 Subject: [PATCH] ola: fix compilation with musl 1.2.3 Upstream sent patch. Signed-off-by: Rosen Penev (cherry picked from commit e35467459b8b7d51d498e380c8216b79b0dc4fd3) --- net/ola/Makefile | 2 +- net/ola/patches/030-musl-123.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 net/ola/patches/030-musl-123.patch diff --git a/net/ola/Makefile b/net/ola/Makefile index a0abec3c6..3a2f1a85b 100644 --- a/net/ola/Makefile +++ b/net/ola/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ola PKG_VERSION:=0.10.8 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)? diff --git a/net/ola/patches/030-musl-123.patch b/net/ola/patches/030-musl-123.patch new file mode 100644 index 000000000..838340b90 --- /dev/null +++ b/net/ola/patches/030-musl-123.patch @@ -0,0 +1,26 @@ +From 418b825ed98d84a5c781267df1e84c3819675d09 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Tue, 12 Apr 2022 20:34:55 -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. + +No idea why this is even here. NULL in C == 0. +--- + ola/AutoStart.cpp | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/ola/AutoStart.cpp ++++ b/ola/AutoStart.cpp +@@ -110,11 +110,7 @@ TCPSocket *ConnectToServer(unsigned shor + // 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)); +-#else +- reinterpret_cast(NULL)); +-#endif // __FreeBSD__ + OLA_WARN << "Failed to exec: " << strerror(errno); + _exit(1); + }