From 7586b3b7fff324b36c6396421fc289572ac80355 Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Fri, 18 Jul 2025 08:13:18 +0000 Subject: benchmarks/lzbench: update the port to the latest version 2.1 - Source code had been reorganized upstream, so the paths to various files we patch had changed - The `pithy' codec had been removed because it is very bad with incompressible data (doesn't fit to allocated buffers) Reported by: portscout --- benchmarks/lzbench/files/patch-bench_util.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 benchmarks/lzbench/files/patch-bench_util.h (limited to 'benchmarks/lzbench/files/patch-bench_util.h') diff --git a/benchmarks/lzbench/files/patch-bench_util.h b/benchmarks/lzbench/files/patch-bench_util.h new file mode 100644 index 000000000000..1fb5b75bdb1c --- /dev/null +++ b/benchmarks/lzbench/files/patch-bench_util.h @@ -0,0 +1,20 @@ +--- bench/util.h.orig 2025-07-17 16:16:38 UTC ++++ bench/util.h +@@ -99,7 +99,7 @@ extern "C" { + # define SET_HIGH_PRIORITY /* disabled */ + # endif + # define UTIL_sleep(s) sleep(s) +-# if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 199309L) ++# if defined(__FreeBSD__) || defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 199309L) + # define UTIL_sleepMilli(milli) { struct timespec t; t.tv_sec=0; t.tv_nsec=milli*1000000ULL; nanosleep(&t, NULL); } + # else + # define UTIL_sleepMilli(milli) /* disabled */ +@@ -349,7 +349,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirNa + return nbFiles; + } + +-#elif (defined(__APPLE__) && defined(__MACH__)) || \ ++#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__) || \ + ((defined(__unix__) || defined(__unix) || defined(__midipix__)) && defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) /* snprintf, opendir */ + # define UTIL_HAS_CREATEFILELIST + # include /* opendir, readdir */ -- cgit v1.2.3