Skip to content

Fix macOS strerror_r incompatibility#290

Closed
UnsaltedHash42 wants to merge 1 commit intoToruNiina:mainfrom
UnsaltedHash42:fix/macos-strerror-r
Closed

Fix macOS strerror_r incompatibility#290
UnsaltedHash42 wants to merge 1 commit intoToruNiina:mainfrom
UnsaltedHash42:fix/macos-strerror-r

Conversation

@UnsaltedHash42
Copy link

This patch corrects the use of for POSIX platforms like macOS, which return an int instead of a char*. Fix tested on macOS 14.3 (ARM64).

@ToruNiina
Copy link
Owner

ToruNiina commented Apr 24, 2025

The problem you are trying to fix existed in a version of toml11 from two years ago, and no longer exists. Although another contributor fixed it at the time, toml11 has released a major update, and much of the code related to this problem has been extensively rewritten.

Your patch is designed to be applied to the code as it was two years ago, and will simply break the current codebase if applied now. I have already given permission for the CI to run, so please check the results.

I followed the link to see why you submitted this patch, and it seems that you ran into errors trying to build another project on MacOS. This project references the toml11 version from two years ago. So a more constructive approach would be to update the toml11 version referenced by the original repository to the latest version.

After the git pull in the client/external/toml11 submodule, change line 33 in client/CMakeLists.txt from include_directories(external/toml11) to include_directories(external/toml11/include).
For most use cases where a file is read but not serialised, code changes are often unnecessary to update toml11 from v3 to v4.

@ToruNiina ToruNiina closed this Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants