Repository navigation
Conversation
This patch fixes emscripten-core#14350, by adding a semicolon. The macro can be used in both cases : - weak_alias(fun, alias) - weak_alias(fun, alias);
|
It should be impossible to ever include this file except when compiling musl.. how are you including it? |
|
If could be that in some older version of emscripten is was possible to include this file... can you try with the latest version? |
I did, tested with 2.0.23
my bad, I think I patched the wrong file |
|
Ah yes, it looks like this issue was already fixed upstream in musl but splitting this into a public I've been working on a musl upgrade for a while not which would address this. Where is this code being used downstream? Presumably downstream contains its own defintion of weak_alias guards with and |
|
Actually can you just try just removing that macro from features.h... it looks like it was added locally at some point and does not exist upstream at all. |
|
It looks like it was added in #11215 |
This was added in #11215 to maintain comatability with upgraded version of stpcpy.c/stpncpy.c/strchrnul.c. However, this macro was never indended to exposed outside of musl itself. In musl v1.2.2 this macro lives in the *internal* version of features.h but musl v1.1.15 does't have an internal features.h. Instead this macro lives in libc.h in v1.1.15. See: #14352 Fixes: #14350
|
I created a PR to remove it completely: #14379 |
I don't think it's possible to undef it, I tried and it gets reincluded if, for example you include string.h (which will include features.h). But it does correctly handle the case where weak_alias is not defined at all. Thanks ! |
Thank you very much Sam! |
This was added in #11215 to maintain comatability with upgraded version of stpcpy.c/stpncpy.c/strchrnul.c. However, this macro was never indended to exposed outside of musl itself. In musl v1.2.2 this macro lives in the *internal* version of features.h but musl v1.1.15 does't have an internal features.h. Instead this macro lives in libc.h in v1.1.15. See: #14352 Fixes: #14350
the contrib is temporarily disabled until this pr is merged: emscripten-core/emscripten#14352
This patch fixes #14350, by adding a semicolon. The macro can be
used in both cases :
This is possible because calling (for eg.) :
with two semicolons is valid, it won't break the current
weak_alias();calls in musl with the semicolon