-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to compile when using strdup C23 standard function #23398
Comments
This is the most important part of the best way |
The reason for this is that emscripten/system/lib/libc/musl/include/string.h Lines 62 to 77 in 1ce7ff5
While this assumption was try for c11 it is no longer true for c23 which added strdup to the standard: https://en.cppreference.com/w/c/string/byte/strdup Kind of crazy that strdup was not part of the C standard until 2023 :) Anyway, I think musl upstream is looking into fixing this: https://www.openwall.com/lists/musl/2023/05/31/20. We could fix it downstream ahead of them if folks are running into this. |
Please include the following in your bug report:
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.74 (1092ec3)
clang version 20.0.0git (https:/github.com/llvm/llvm-project 322eb1a92e6d4266184060346616fa0dbe39e731)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /Users/x/emsdk/upstream/bin
Failing command line in full:
Command line:
Output:
Full link command and output with
-v
appended:Command line:
Output:
Google group conversation:
https://groups.google.com/g/emscripten-discuss/c/3DMpT62eLuE
The text was updated successfully, but these errors were encountered: