Skip to content

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

@ernsteiswuerfel

Description

@ernsteiswuerfel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions