From b13f4e5ed28b675d2c300774949498980ef9180f Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Thu, 24 Oct 2019 03:40:20 +0000 Subject: [PATCH] MFC (proactively; not required yet) r339673: 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. --- 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 bda8bf60198..7e563b7ba9c 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -148,9 +148,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" -- 2.45.0