diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2021-09-07 09:42:18 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2021-09-07 09:42:20 +0000 |
commit | ee394fe49a846f91d97d258bbcdb5d8d78179c87 (patch) | |
tree | 1c0c2b433ab6960160f00d1349ecf8d5692aaf5b | |
parent | 4f4912744b7930e00a1ccf46c508d88b16806ea8 (diff) | |
download | ports-ee394fe49a846f91d97d258bbcdb5d8d78179c87.tar.gz ports-ee394fe49a846f91d97d258bbcdb5d8d78179c87.zip |
databases/iowow: unbreak the build on FreeBSD 11.x
Unfortunately, pthread_setname_np() is not available there,
so use the older pthread_set_name_np() for the time being.
Reported by: pkg-fallout
-rw-r--r-- | databases/iowow/files/patch-src_platform_unix_unix.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/databases/iowow/files/patch-src_platform_unix_unix.c b/databases/iowow/files/patch-src_platform_unix_unix.c index 62529cbc5fe4..6910201ce373 100644 --- a/databases/iowow/files/patch-src_platform_unix_unix.c +++ b/databases/iowow/files/patch-src_platform_unix_unix.c @@ -1,6 +1,6 @@ ---- src/platform/unix/unix.c.orig 2018-05-19 14:09:04 UTC +--- src/platform/unix/unix.c.orig 2021-09-03 09:03:05 UTC +++ src/platform/unix/unix.c -@@ -314,7 +314,7 @@ iwrc iwp_fdatasync(HANDLE fh) { +@@ -355,7 +355,7 @@ iwrc iwp_fdatasync(HANDLE fh) { if (fcntl(fh, F_FULLFSYNC) == -1) { return iwrc_set_errno(IW_ERROR_IO_ERRNO, errno); } @@ -8,4 +8,15 @@ +#elif defined(__FreeBSD_version) && __FreeBSD_version > 1100501 if (fdatasync(fh) == -1) { return iwrc_set_errno(IW_ERROR_IO_ERRNO, errno); - } + } +@@ -384,6 +384,10 @@ void iwp_set_current_thread_name(const char *name) { + + #if defined(__linux__) + prctl(PR_SET_NAME, name); ++#elif defined(__FreeBSD__) ++ // We're using even more non-standard pthread_set_name_np() here ++ // because pthread_setname_np() is not available on FreeBSD 11.X. ++ pthread_set_name_np(pthread_self(), name); + #elif defined(__NetBSD__) + rv = pthread_setname_np(pthread_self(), "%s", (void*) name); + #elif defined(__APPLE__) |