Skip to content
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

1.23.2 fails to build on cygwin for LLADDR #2034

Closed
matzeri opened this issue Oct 14, 2018 · 2 comments
Closed

1.23.2 fails to build on cygwin for LLADDR #2034

matzeri opened this issue Oct 14, 2018 · 2 comments

Comments

@matzeri
Copy link

matzeri commented Oct 14, 2018

1.23.1 builds fine on cygwin 64 bit

1.23.2 fails as

bsd-ifaddrs.c:128:36: warning: implicit declaration of function ‘LLADDR’; did yo
u mean ‘EBADR’? [-Wimplicit-function-declaration]
         memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr))
;
                                    ^
[cut ...]
CCLD     libuv.la
src/unix/.libs/libuv_la-bsd-ifaddrs.o: In function `uv_interface_addresses':
/usr/src/debug/libuv-1.23.2-1/src/unix/bsd-ifaddrs.c:128: undefined reference to `LLADDR'
/usr/src/debug/libuv-1.23.2-1/src/unix/bsd-ifaddrs.c:128:(.text+0x166): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `LLADDR'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1336: libuv.la] Error 1

Also adding the Linux definition of the macro does not work as

  CC       src/unix/libuv_la-bsd-ifaddrs.lo
In file included from /usr/include/string.h:180:0,
                 from /cygdrive/d/cyg_pub/devel/libuv/libuv-1.23.2-1.x86_64/src/libuv-1.23.2/src/unix/internal.h:29,
                 from /cygdrive/d/cyg_pub/devel/libuv/libuv-1.23.2-1.x86_64/src/libuv-1.23.2/src/unix/bsd-ifaddrs.c:23:
/cygdrive/d/cyg_pub/devel/libuv/libuv-1.23.2-1.x86_64/src/libuv-1.23.2/src/unix/bsd-ifaddrs.c: In function ‘uv_interface_addresses’:
/cygdrive/d/cyg_pub/devel/libuv/libuv-1.23.2-1.x86_64/src/libuv-1.23.2/include/uv.h:1587:33: error: dereferencing pointer to incomplete type ‘struct sockaddr_dl’
 #define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen))
                                 ^
/cygdrive/d/cyg_pub/devel/libuv/libuv-1.23.2-1.x86_64/src/libuv-1.23.2/src/unix/bsd-ifaddrs.c:128:36: note: in expansion of macro ‘LLADDR’
         memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr));
                                    ^~~~~~
make: *** [Makefile:2280: src/unix/libuv_la-bsd-ifaddrs.lo] Error 1
@cjihrig
Copy link
Contributor

cjihrig commented Oct 14, 2018

@matzeri does #2035 fix things?

@matzeri
Copy link
Author

matzeri commented Oct 14, 2018

It builds fine as before with 1.23.1

cjihrig added a commit to cjihrig/libuv that referenced this issue Oct 15, 2018
Prior to libuv#1999,
uv_interface_addresses() did not populate the phys_addr field on
Cygwin or MinGW. This commit restores that behavior, which was
mistakenly changed.

Fixes: libuv#2034
PR-URL: libuv#2035
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants