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

Fails to build with GCC 14: "In function 'mysendto6': libndp.c:212:50: error: passing argument 5 of 'sendto' from incompatible pointer type [-Wincompatible-pointer-types]" #25

Open
ernsteiswuerfel opened this issue Mar 6, 2024 · 2 comments

Comments

@ernsteiswuerfel
Copy link

At building 1.8 (Gentoo downstream bug report: https://bugs.gentoo.org/922613) and also at building from git-master with GCC 14 I get:

 # make
Making all in include
make[1]: Entering directory '/root/builddir/libndp/include'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/root/builddir/libndp/include'
Making all in libndp
make[1]: Entering directory '/root/builddir/libndp/libndp'
  CC       libndp_la-libndp.lo
libndp.c: In function 'mysendto6':
libndp.c:212:50: error: passing argument 5 of 'sendto' from incompatible pointer type [-Wincompatible-pointer-types]
  212 |         ret = sendto(sockfd, buf, buflen, flags, &sin6, sizeof(sin6));
      |                                                  ^~~~~
      |                                                  |
      |                                                  struct sockaddr_in6 *
In file included from libndp.c:27:
/usr/include/sys/socket.h:396:49: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_in6 *'
  396 | ssize_t sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:452: libndp_la-libndp.lo] Error 1
make[1]: Leaving directory '/root/builddir/libndp/libndp'
make: *** [Makefile:390: all-recursive] Error 1

Building was done on my Talos II on my ppc32/musl chroot.

config.log attached.
config.log

@Solegaiter
Copy link

You can test this? If I am correct that may solve your problem. #28

@ernsteiswuerfel
Copy link
Author

Applied your patch on top of libndp-1.8 and it works.

Thanks for your effort!

algitbot pushed a commit to alpinelinux/aports that referenced this issue Aug 27, 2024
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