NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/55807: libexec/identd/npf.c fails to compile on -current



>Number:         55807
>Category:       bin
>Synopsis:       libexec/identd/npf.c fails to compile on -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 16 16:40:00 +0000 2020
>Originator:     Onno van der Linden
>Release:        NetBSD 9.99.75
>Organization:
>Environment:
System: NetBSD sheep 9.99.75 NetBSD 9.99.75 (SHEEPKMS) #0: Sat Nov 14 12:22:46 CET 2020 onno@sheep:/usr/src/sys/arch/i386/compile/SHEEPKMS i386
Architecture: i386
Machine: i386
>Description:
#   compile  identd/npf.o
/usr/tools/bin/i486--netbsdelf-gcc -O2   -fPIE -fno-strict-aliasing   -std=gnu99    -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wsystem-headers   -Wno-traditional   -Wa,--fatal-warnings  -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2  -Wno-format-zero-length  -Werror     --sysroot=/ -DWITH_IPF -DWITH_PF -DWITH_NPF  -c    /usr/src/libexec/identd/npf.c
/usr/src/libexec/identd/npf.c: In function 'npf_natlookup':
/usr/src/libexec/identd/npf.c:65:21: error: taking address of packed member of 'struct sockaddr_in' may result in an unaligned pointer value [-Werror=address-of-packed-member]
   65 |   addr[0] = (void *)&satosin(nat_addr)->sin_addr;
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/libexec/identd/npf.c:32:
/usr/src/libexec/identd/npf.c:66:23: error: taking address of packed member of 'struct sockaddr_in' may result in an unaligned pointer value [-Werror=address-of-packed-member]
   66 |   addr[1] = __UNCONST(&csatosin(&ss[1])->sin_addr);
      |                       ^
cc1: all warnings being treated as errors
*** Error code 1

Stop.
make: stopped in /usr/src/libexec/identd
>How-To-Repeat:
Compile identd/npf.c on -current with gcc 9.3.0
>Fix:
Don't use -Werror=address-of-packed-member but that seems
sticking your head in the sand to me



Home | Main Index | Thread Index | Old Index