Samsung / libtuv

Asynchronous I/O for IoT.js and embedded system
Apache License 2.0
129 stars 76 forks source link

Fix uv__to_stat function on Nuttx with newer gcc #100

Closed galpeter closed 6 years ago

galpeter commented 6 years ago

With a newer arm gcc (5.0+) the _DEFAULT_SOURCE macro gets defined when the unix/fs.c file is built thus trying to access a set of stat struct members which are not defined on Nuttx.

By adding an extra check to see if the build is for Nuttx we can correctly select the stat conversion code path.

libtuv-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com

galpeter commented 6 years ago

Related issue: https://github.com/Samsung/iotjs/issues/1313

yichoi commented 6 years ago

LGTM