diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2025-03-01 06:03:00 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2025-03-01 06:03:00 +0000 |
commit | 7cc244f0d1e7fff69b971cee8e0b18ed257809a4 (patch) | |
tree | 38b4acd14acdf4cde37aaba35fef0985ba1f7d30 /benchmarks/lzbench/files/patch-__lzbench_util.h | |
parent | archivers/libunrar: Update to 7.1.5 (diff) |
benchmarks/lzbench: the port had been updated to version 2.0.1
Adjust preprocessor logic for the fact that FreeBSD has proper
directory(3) and nanosleep(2) support.
PR: 284231
Reported by: portscout
Diffstat (limited to 'benchmarks/lzbench/files/patch-__lzbench_util.h')
-rw-r--r-- | benchmarks/lzbench/files/patch-__lzbench_util.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/benchmarks/lzbench/files/patch-__lzbench_util.h b/benchmarks/lzbench/files/patch-__lzbench_util.h new file mode 100644 index 000000000000..e655f49daf97 --- /dev/null +++ b/benchmarks/lzbench/files/patch-__lzbench_util.h @@ -0,0 +1,20 @@ +--- _lzbench/util.h.orig 2025-02-11 19:23:29 UTC ++++ _lzbench/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 <dirent.h> /* opendir, readdir */ |