[PATCH 1/2] libfrog: fix crc32c self test code on cross builds

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

 



From: Darrick J. Wong <djwong@xxxxxxxxxx>

Helmut Grohne reported that the crc32c self test program fails to cross
build on 5.14.0 if the build host doesn't have liburcu installed.  We
don't need userspace RCU functionality to test crc32 on the build host,
so twiddle the header files to include only the two header files that we
actually need.

Note: Build-time testing of crc32c is useful for upstream developers so
that we can check that we haven't broken the checksum code, but we
really ought to be testing this in mkfs and repair on the user's system
so that they don't end up with garbage filesystems.  A future patch will
introduce that.

Reported-by: Helmut Grohne <helmut@xxxxxxxxxx>
Cc: Bastian Germann <bage@xxxxxxxxxx>
Suggested-by: Dave Chinner <david@xxxxxxxxxxxxx>
Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 libfrog/crc32.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


diff --git a/libfrog/crc32.c b/libfrog/crc32.c
index 526ce950..6a273b71 100644
--- a/libfrog/crc32.c
+++ b/libfrog/crc32.c
@@ -29,10 +29,15 @@
  * match the hardware acceleration available on Intel CPUs.
  */
 
+/*
+ * Do not include platform_defs.h here; this will break cross builds if the
+ * build host does not have liburcu-dev installed.
+ */
+#include <stdio.h>
+#include <sys/types.h>
 #include <inttypes.h>
 #include <asm/types.h>
 #include <sys/time.h>
-#include "platform_defs.h"
 /* For endian conversion routines */
 #include "xfs_arch.h"
 #include "crc32defs.h"




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux