Message ID | 20240212161939.11938-1-tmn505@terefe.re |
---|---|
State | Accepted, archived |
Headers | show |
Series | [firmware-utils] zycast: disable build on non-Linux OS | expand |
Hi Tomasz, On Mon, 2024-02-12 at 17:18 +0100, Tomasz Maciej Nowak wrote: > From: Tomasz Maciej Nowak <tmn505@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@gmail.com> > --- Thanks for the patch, pushed to firmware-utils/master. I've trimmed the error output in the commit message, so it doesn't contain the full paths and all compiler options. Best, Sander
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 "" "" "")