From ad6f5f9ab52eeedca8cbdb325e78b33381bd0e2f Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 23 Oct 2018 23:11:38 +0000 Subject: [PATCH] Fix stand/ build after r339671. ffs_subr.c requires calculate_crc32c() from libkern. Unfortunately we cannot just add libkern/crc32.c to libstand because crc32.o is already compiled from contrib/zlib/crc32.c. Use the include trick to rename the source. Note that libstand also provides crc32.c which seems to be unused. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D17677 --- stand/libsa/Makefile | 4 ++-- stand/libsa/crc32_libkern.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 stand/libsa/crc32_libkern.c diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 69df6be894a..d59db0fd51b 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -155,9 +155,9 @@ SRCS+=ffs_subr.c ffs_tables.c CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2 -# explicit_bzero +# explicit_bzero and calculate_crc32c .PATH: ${SYSDIR}/libkern -SRCS+= explicit_bzero.c +SRCS+= explicit_bzero.c crc32_libkern.c # Maybe GELI .if ${MK_LOADER_GELI} == "yes" diff --git a/stand/libsa/crc32_libkern.c b/stand/libsa/crc32_libkern.c new file mode 100644 index 00000000000..995815294d5 --- /dev/null +++ b/stand/libsa/crc32_libkern.c @@ -0,0 +1,3 @@ +/* $FreeBSD$ */ + +#include "../../sys/libkern/crc32.c"