Skip to content

Commit f1c9a91

Browse files
committed
macos_unit_tests.yml: specified the deployment target to be macOS 15.4
The function 'strchrnul' has been marked as being introduced in macOS 15.4, although it seems to have been working for as long as we have been testing on macOS. Since warnings are treated as errors, the build will fail. Hence, the simplest way to silence the warning is, it to specify the deployment target to be a minimum of macOS 15.4. ``` logging.c:651:28: error: 'strchrnul' is only available on macOS 15.4 or newer [-Werror,-Wunguarded-availability-new] 651 | char *next_token = strchrnul(token, ','); CC queue.lo | ^~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0 198 | strchrnul(const char *__s, int __c); CC rb-tree.lo | ^ logging.c:651:28: note: enclose 'strchrnul' in a __builtin_available check to silence this warning 651 | char *next_token = strchrnul(token, ','); | ^~~~~~~~~ 1 error generated. ``` It has been done similarly here: NorthernTechHQ/libntech#255 Signed-off-by: Victor Moene <[email protected]>
1 parent 935f401 commit f1c9a91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/macos_unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
run: >
2121
./autogen.sh --enable-debug
2222
- name: Compile and link
23-
run: make -j8 CFLAGS="-Werror -Wall"
23+
run: MACOSX_DEPLOYMENT_TARGET=15.4 make -j8 CFLAGS="-Werror -Wall"
2424
- name: Run unit tests
2525
run: make -C tests/unit check

0 commit comments

Comments
 (0)