I think it would solve expat's problem because the arc4random detection
code will not define _BSD_SOURCE on a non BSD system.So it will not detect
the presence of the arc4random function and will not try to use it.
On Monday, September 18, 2017 at 8:58:00 PM UTC+2, jj wrote
The implementation of arc4random comes from this ancient commit from
February 2013:
https://github.com/kripken/emscripten/commit/a5c78a58902abd6166a81a895cc9eea141c9cab4.
There is no grand reason behind supporting it, and there doesn't exist
a BSD compatibility layer of any kind in general
I commented out the
arc4random: 'rand',
line in library.js
This causes the expat configure to not find arc4random and the build
succeeds.
Why are you providing the arc4random definition if it is not part of the c
standard library? Bsd compatibility?
On Monday, September 18, 2017 at 5:32:48
2017-09-18 17:03 GMT+03:00 Dirk Vanden Boer <dirk@gmail.com>:
> I patched the expat source to include the declaration of the arc4random
> function. That allows it to compile.
> Seems like emscripten should provide the declaration though if it provides
> the implementatio
I patched the expat source to include the declaration of the arc4random
function. That allows it to compile.
Seems like emscripten should provide the declaration though if it provides
the implementation. Otherwise every project that uses the cmake
infrastructure to detect this function
Searching for arc4random in Emscripten codebase gives:
Searching 7677 files for "arc4random"
c:\code\emsdk\emscripten\incoming\src\deps_info.json:
2: "arc4random": ["rand"],
c:\code\emsdk\emscripten\incoming\src\library.js:
796: // For compatibility, cal
I'm trying to compile expat with emscripten, it fails on an arc4random call
however.
/usr/local/Cellar/emscripten/1.37.18/libexec/emcc -DHAVE_EXPAT_CONFIG_H
@CMakeFiles/expat.dir/includes_C.rsp -fno-strict-aliasing -DNDEBUG -O2 -fPIC
-o CMakeFiles/expat.dir/lib/xmlparse.c.o -c xmlparse.c