Date: Sun, 17 Mar 2024 17:58:18 GMT From: Vladimir Druzenko <vvd@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: f2aa302b1089 - main - net/freerdp3: fix "sysinfo" breakage Message-ID: <202403171758.42HHwIjl067810@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=f2aa302b1089d3f818d3d3c0e4d0548aaf766e7b commit f2aa302b1089d3f818d3d3c0e4d0548aaf766e7b Author: Vladimir Druzenko <vvd@FreeBSD.org> AuthorDate: 2024-03-17 17:41:09 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2024-03-17 17:58:07 +0000 net/freerdp3: fix "sysinfo" breakage After upstream commit https://github.com/FreeRDP/FreeRDP/commit/4732f379d4d723378a5ec4948b00061cebbd67af net/freerdp3 build fails in enveronments without devel/libsysinfo installed. But with devel/libsysinfo installed net/freerdp3 grab silently LOCALBASE/include/sys/sysinfo.h, build without errors, but sdl-freerdp and wlfreerdp3 run failed with error: ld-elf.so.1: /usr/local/lib/libwinpr3.so.3: Undefined symbol "sysinfo" Upstream check supported version of the posix using _POSIX_C_SOURCE define. This doesn't work on FreeBSD. Together with upstream trying to find correct solution... Approved by: arrowd (mentor) --- net/freerdp3/Makefile | 1 + .../files/patch-winpr_libwinpr_sysinfo_sysinfo.c | 29 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/net/freerdp3/Makefile b/net/freerdp3/Makefile index 1cbeaac94829..7d102ef502eb 100644 --- a/net/freerdp3/Makefile +++ b/net/freerdp3/Makefile @@ -1,5 +1,6 @@ PORTNAME= freerdp DISTVERSION= 3.4.0 +PORTREVISION= 1 CATEGORIES= net comms MASTER_SITES= https://pub.freerdp.com/releases/ \ https://github.com/FreeRDP/FreeRDP/releases/download/${DISTVERSION}/ diff --git a/net/freerdp3/files/patch-winpr_libwinpr_sysinfo_sysinfo.c b/net/freerdp3/files/patch-winpr_libwinpr_sysinfo_sysinfo.c new file mode 100644 index 000000000000..23b92abce568 --- /dev/null +++ b/net/freerdp3/files/patch-winpr_libwinpr_sysinfo_sysinfo.c @@ -0,0 +1,29 @@ +--- winpr/libwinpr/sysinfo/sysinfo.c.orig 2024-03-14 10:28:33 UTC ++++ winpr/libwinpr/sysinfo/sysinfo.c +@@ -34,7 +34,7 @@ + #endif + + #if !defined(_WIN32) +-#if defined(_POSIX_SOURCE) && (_POSIX_C_SOURCE >= 200112L) ++#if (_POSIX_C_SOURCE >= 200112L) || defined(__FreeBSD__) + #include <time.h> + #elif !defined(__APPLE__) + #include <sys/time.h> +@@ -579,7 +579,7 @@ ULONGLONG winpr_GetTickCount64(void) + UINT64 winpr_GetTickCount64NS(void) + { + UINT64 ticks = 0; +-#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) ++#if (_POSIX_C_SOURCE >= 200112L) || defined(__FreeBSD__) + struct timespec ts = { 0 }; + + if (clock_gettime(CLOCK_MONOTONIC_RAW, &ts) == 0) +@@ -632,7 +632,7 @@ UINT64 winpr_GetUnixTimeNS(void) + } t = { 0 }; + GetSystemTimeAsFileTime(&t.ft); + return (t.u64 - FILETIME_TO_UNIX_OFFSET_S * 10000000ull) * 100ull; +-#elif _POSIX_C_SOURCE >= 200112L ++#elif (_POSIX_C_SOURCE >= 200112L) || defined(__FreeBSD__) + struct timespec ts = { 0 }; + if (clock_gettime(CLOCK_REALTIME, &ts) != 0) + return 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403171758.42HHwIjl067810>