From owner-dev-commits-ports-main@freebsd.org Thu Aug 12 07:57:52 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6D35665F64; Thu, 12 Aug 2021 07:57:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GlfDw5jKPz3tfS; Thu, 12 Aug 2021 07:57:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACE561F0B9; Thu, 12 Aug 2021 07:57:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17C7vqna083680; Thu, 12 Aug 2021 07:57:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17C7vqiZ083679; Thu, 12 Aug 2021 07:57:52 GMT (envelope-from git) Date: Thu, 12 Aug 2021 07:57:52 GMT Message-Id: <202108120757.17C7vqiZ083679@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gerald Pfeifer Subject: git: 7d6c458605b7 - main - emulators/wine-devel: Fix build when devel/libsysinfo is present MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gerald X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d6c458605b7075a8bc6d4c0d80605f49f17dd21 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2021 07:57:52 -0000 The branch main has been updated by gerald: URL: https://cgit.FreeBSD.org/ports/commit/?id=7d6c458605b7075a8bc6d4c0d80605f49f17dd21 commit 7d6c458605b7075a8bc6d4c0d80605f49f17dd21 Author: Gerald Pfeifer AuthorDate: 2021-08-12 07:53:10 +0000 Commit: Gerald Pfeifer CommitDate: 2021-08-12 07:57:34 +0000 emulators/wine-devel: Fix build when devel/libsysinfo is present When devel/libsysinfo is present, exists which misleads Wine into enabling some code that invokes the sysinfo function. That one isn't actually available, though, without additional linking parameters (and we don't want to add another dependency at this point anyway), so properly test for sysinfo() before using it. This is a patch of mine that was accepted upstream and should come in via Wine 6.15. PR: 257398 --- .../files/patch-dlls-ntdll-unix-virtual.c | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/emulators/wine-devel/files/patch-dlls-ntdll-unix-virtual.c b/emulators/wine-devel/files/patch-dlls-ntdll-unix-virtual.c new file mode 100644 index 000000000000..125e0908dcc6 --- /dev/null +++ b/emulators/wine-devel/files/patch-dlls-ntdll-unix-virtual.c @@ -0,0 +1,68 @@ +commit 59da79021a6e441e3b21b933c744aba922208ec1 +Author: Gerald Pfeifer +Date: Tue Aug 10 22:36:27 2021 +0200 + + ntdll: Only use sysinfo function when present. + + On some systems may be present while the sysinfo + function may not, or at least not as part of standard libraries, + so check whether the function is actually available before using + it. + + This fixes builds on FreeBSD with the devel/libsysinfo present. + + Signed-off-by: Gerald Pfeifer + Signed-off-by: Alexandre Julliard + +diff --git a/configure b/configure +index 1be0aa9d217..e8c1cb9e3a8 100755 +--- configure ++++ configure +@@ -18068,6 +18068,7 @@ for ac_func in \ + setprogname \ + sigprocmask \ + symlink \ ++ sysinfo \ + tcdrain \ + thr_kill2 + +diff --git a/configure.ac b/configure.ac +index 69e27147088..065b3f231bf 100644 +--- configure.ac ++++ configure.ac +@@ -2205,6 +2205,7 @@ AC_CHECK_FUNCS(\ + setprogname \ + sigprocmask \ + symlink \ ++ sysinfo \ + tcdrain \ + thr_kill2 + ) +diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c +index a252e25fbc6..2cca90ac952 100644 +--- dlls/ntdll/unix/virtual.c ++++ dlls/ntdll/unix/virtual.c +@@ -2737,7 +2737,8 @@ ULONG_PTR get_system_affinity_mask(void) + */ + void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info, BOOL wow64 ) + { +-#if defined(HAVE_STRUCT_SYSINFO_TOTALRAM) && defined(HAVE_STRUCT_SYSINFO_MEM_UNIT) ++#if defined(HAVE_SYSINFO) \ ++ && defined(HAVE_STRUCT_SYSINFO_TOTALRAM) && defined(HAVE_STRUCT_SYSINFO_MEM_UNIT) + struct sysinfo sinfo; + + if (!sysinfo(&sinfo)) +diff --git a/include/config.h.in b/include/config.h.in +index ad770281471..24f7b64ffd3 100644 +--- include/config.h.in ++++ include/config.h.in +@@ -744,6 +744,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYSCALL_H + ++/* Define to 1 if you have the `sysinfo' function. */ ++#undef HAVE_SYSINFO ++ + /* Define to 1 if you have the + header file. */ + #undef HAVE_SYSTEMCONFIGURATION_SCDYNAMICSTORECOPYDHCPINFO_H