Current-Users archive

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

pkgtools/pkgin 0.16.1 fails build under -current



Hi,

I get:
...
#   compile  pkgin-0.16.1/tools.o
gcc -O2 -I/usr/include -I/usr/pkg/include   -fPIE    -std=gnu99
-Werror    -DHAVE_NBCOMPAT_H=1
-I/usr/pkgsrc/pkgtools/pkgin/work/libnbcompat -I/usr/include
-I/usr/pkg/include -DPKGIN_VERSION=\""0.16.1 for NetB
SD-9.99.60 x86_64"\" -DHAVE_NBCOMPAT_H=1
-I/usr/pkgsrc/pkgtools/pkgin/work/libnbcompat -I/usr/include
-I/usr/pkg/include -g -DLOCALBASE=\"/usr/pkg\"
-DPKG_SYSCONFDIR=\"/usr/pkg/etc\"
         -DPKGIN_DBDIR=\"/var/db/pkgin\"
-DPKGTOOLS=\"/usr/pkg/sbin\" -DHAVE_CONFIG_H -D_LARGEFILE_SOURCE
-D_LARGE_FILES -DCHECK_MACHINE_ARCH=\"x86_64\" -I. -I/usr/pkg/include
-c    tools.c
tools.c: In function 'strreplace':
tools.c:170:4: error: 'strncat' specified bound depends on the length
of the source argument [-Werror=stringop-overflow=]
    strncat(buf, to, tolen);
    ^~~~~~~~~~~~~~~~~~~~~~~
tools.c:166:10: note: length computed here
  tolen = strlen(to);
          ^~~~~~~~~~
cc1: all warnings being treated as errors
*** Error code 1

For lack of understanding, adding

CFLAGS+=  -Wno-stringop-overflow

to the Makefile completes the build, but probably is not the right thing to do.

Chavdar


-- 
----


Home | Main Index | Thread Index | Old Index