Page MenuHomeFreeBSD

ZFS: Fix tests build with FORTIFY_SOURCE
ClosedPublic

Authored by emaste on Mon, Jun 16, 1:47 PM.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste created this revision.

Build failure was:

In file included from /home/emaste/src/freebsd-git/wipbsd/cddl/lib/libtpool/tests/libtpool_test.c:8:
In file included from /usr/obj/home/emaste/src/freebsd-git/wipbsd/amd64.amd64/sysroot/usr/include/atf-c.h:30:
In file included from /usr/obj/home/emaste/src/freebsd-git/wipbsd/amd64.amd64/sysroot/usr/include/atf-c/macros.h:29:
/home/emaste/src/freebsd-git/wipbsd/sys/contrib/openzfs/lib/libspl/include/string.h:34:15: error: expected parameter declarator
   34 | extern size_t strlcat(char *dst, const char *src, size_t dstsize);
      |               ^                             
/usr/obj/home/emaste/src/freebsd-git/wipbsd/amd64.amd64/sysroot/usr/include/ssp/string.h:137:37: note: expanded from macro 'strlcat'
  137 |     __strlcat_chk(dst, src, dstlen, __ssp_bos(dst))
      |                                     ^
/usr/obj/home/emaste/src/freebsd-git/wipbsd/amd64.amd64/sysroot/usr/include/ssp/ssp.h:66:51: note: expanded from macro '__ssp_bos'
   66 | #define __ssp_bos(ptr) __builtin_object_size(ptr, __SSP_FORTIFY_LEVEL > 1)
      |                                                   ^
/usr/obj/home/emaste/src/freebsd-git/wipbsd/amd64.amd64/sysroot/usr/include/ssp/ssp.h:43:32: note: expanded from macro '__SSP_FORTIFY_LEVEL'
   43 | #   define __SSP_FORTIFY_LEVEL 2
      |                                ^

Can we spell this as .include "${SRCTOP}/cddl/Makefile.inc" instead? I wanted to try and consolidate some of the carnal knowledge for building cddl stuff in one place. I'd like another one for "things that need to include openzfs stuff" since we have this long list of -I paths with sensitive ordering (see, e.g., lib/libbe) for anything that want to use libzfs or other parts of openzfs.

Use include as Kyle suggests

This revision is now accepted and ready to land.Mon, Jun 16, 2:45 PM
This revision was automatically updated to reflect the committed changes.