freebsd: hard-code UV_ENODATA definition (#3999)
`FreeBSD` defines `ENODATA` in /usr/include/c++/v1/errno.h which is only visible if C++ is the compilation unit. This can cause interop issues when integrating libuv build with C on a C++ project. Avoid this issue by directly defining with the value defined in the file previously mentioned.
This commit is contained in:
parent
d1a2efc77b
commit
6f94701467
@ -456,8 +456,14 @@
|
||||
# define UV__ESOCKTNOSUPPORT (-4025)
|
||||
#endif
|
||||
|
||||
/* FreeBSD defines ENODATA in /usr/include/c++/v1/errno.h which is only visible
|
||||
* if C++ is being used. Define it directly to avoid problems when integrating
|
||||
* libuv in a C++ project.
|
||||
*/
|
||||
#if defined(ENODATA) && !defined(_WIN32)
|
||||
# define UV__ENODATA UV__ERR(ENODATA)
|
||||
#elif defined(__FreeBSD__)
|
||||
# define UV__ENODATA (-9919)
|
||||
#else
|
||||
# define UV__ENODATA (-4024)
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user