[PATCH firmware-utils] zycast: disable build on non-Linux OS

Tomasz Maciej Nowak tmn505 at terefe.re
Mon Feb 12 08:18:33 PST 2024


From: Tomasz Maciej Nowak <tmn505 at gmail.com>

Fails with following errors on MacOS builder:

[ 96%] Building C object CMakeFiles/zycast.dir/src/zycast.c.o
/usr/bin/gcc   -I/Users/runner/work/firmware-utils/firmware-utils/openwrt/tools/include -I/usr/local/opt/libressl/include -O3 -DNDEBUG -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=12.7   -Wall -Wno-unused-parameter -MD -MT CMakeFiles/zycast.dir/src/zycast.c.o -MF CMakeFiles/zycast.dir/src/zycast.c.o.d -o CMakeFiles/zycast.dir/src/zycast.c.o -c /Users/runner/work/firmware-utils/firmware-utils/src/zycast.c
/Users/runner/work/firmware-utils/firmware-utils/src/zycast.c:205:35: error: use of undeclared identifier 'MSG_MORE'
                if (send(sockfd, phdr, HDRSIZE, MSG_MORE | MSG_DONTROUTE) < 0)
                                                ^
/Users/runner/work/firmware-utils/firmware-utils/src/zycast.c:285:39: error: use of undeclared identifier 'SO_BINDTODEVICE'
                        if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,  optarg, strlen(optarg)) < 0)
                                                           ^
2 errors generated.

These seem to be Linux only definitions and there are no equivalents,
so leave rewrite of zycast to someone interested in running it on
other OS.

Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6963ad64e74..f0f608aa39d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,7 +110,9 @@ FW_UTIL(uimage_sgehdr "" "" "${ZLIB_LIBRARIES}")
 FW_UTIL(wrt400n src/cyg_crc32.c "" "")
 FW_UTIL(xiaomifw "" "" "")
 FW_UTIL(xorimage "" "" "")
-FW_UTIL(zycast "" "" "")
+if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+  FW_UTIL(zycast "" "" "")
+endif()
 FW_UTIL(zyimage "" "" "")
 FW_UTIL(zytrx "" "" "")
 FW_UTIL(zyxbcm "" "" "")
-- 
2.43.1




More information about the openwrt-devel mailing list