From nobody Mon Nov 29 20:56:08 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9096218C6045; Mon, 29 Nov 2021 20:56:09 +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 4J2yLd1CrDz4c5H; Mon, 29 Nov 2021 20:56:09 +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 C386E1622; Mon, 29 Nov 2021 20:56:08 +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 1ATKu8Hm081202; Mon, 29 Nov 2021 20:56:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATKu8ut081201; Mon, 29 Nov 2021 20:56:08 GMT (envelope-from git) Date: Mon, 29 Nov 2021 20:56:08 GMT Message-Id: <202111292056.1ATKu8ut081201@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: 83c19a7238e9 - main - lang/mono: Fix build on current with _WITH_CPU_SET_T List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83c19a7238e9f5f46a9186e3ce58d03585691e5d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638219369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gwqa9WSY/F+7Lh+GFKx1OZ3Ixdyaxa8Ga0Z1xD191+M=; b=YVSQafqHWr1f2u7fznkl7pKE1FsDK4METbVOPBp3lXJuhmw5FkIeKrQkiQ3E0dPbM/xHjJ dc+1PwJ2Y6BQf2S09oJmKAtaGo9zINzrv/9UNBAcyqlvDp+qjUvOi+DZllbe8Yhru3REhW PrLxmtYRSzA+BV2c57CG3cLo5VmWdTUJlX7FANwSRGC6tkIc+A7gU06Ym+ziuKZRUegF2K 6HRf6drK76e2j0x5o1y5iFgj5UWFz6xvfxApKk0yh/Ci18uhPEwnO2aMhzeNQMnVQEruw+ ovq0e1dAEBV55hEBoclsKJKtOYm5qVQjIyZ3G2ZfrQaYKMz+OapYqxTqJNu5Cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638219369; a=rsa-sha256; cv=none; b=ucRg2l2J3rjZsCWc8nzz8mzZ1j1q1mc03R3T9vZkEDrN66i0RSxnoVOruhZFrLa55UlQ39 86mlR6xtKjccR56b2NDSbK3OgxBn2DnvRLTusq4uphOSB9V4qrU1uManxf7qlnF1LG68xP C/nYR2bRVN6abO2jyTYsedfl5icLlEs/AiMrWZb7L3TDQuSEGiNqYae0LKCY1m4J/ijUJg GTBTxNRVUwJ62/irmZbII+5zvh0Brp5xal+PPrLs4o/OMtOkeUVLan1DOsTNbEDaj+0Xn6 QMvWHicSGQAbr5ZoZrYg77U7xMw/KIAnaRqAqJcIlZDPUqHe1Gmux59oqTiG4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=83c19a7238e9f5f46a9186e3ce58d03585691e5d commit 83c19a7238e9f5f46a9186e3ce58d03585691e5d Author: Cy Schubert AuthorDate: 2021-11-28 01:52:24 +0000 Commit: Cy Schubert CommitDate: 2021-11-29 20:55:18 +0000 lang/mono: Fix build on current with _WITH_CPU_SET_T mono-proclib.c:776:3: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'? cpu_set_t set; ^~~~~~~~~ cpuset_t /usr/include/sys/_cpuset.h:50:24: note: 'cpuset_t' declared here typedef struct _cpuset cpuset_t; ^ mono-proclib.c:777:7: error: implicit declaration of function 'sched_getaffinity' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (sched_getaffinity (mono_process_current_pid (), sizeof (set), &set) == 0) ^ mono-proclib.c:778:11: error: implicit declaration of function 'CPU_COUNT' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return CPU_COUNT (&set); ^ 3 errors generated. MFH after: 3 days --- lang/mono/files/patch-mono_mini_driver.c | 21 +++++++++++++++++++++ lang/mono/files/patch-mono_utils_mono-proclib.c | 10 ++++++++++ 2 files changed, 31 insertions(+) diff --git a/lang/mono/files/patch-mono_mini_driver.c b/lang/mono/files/patch-mono_mini_driver.c new file mode 100644 index 000000000000..b3601c0d082f --- /dev/null +++ b/lang/mono/files/patch-mono_mini_driver.c @@ -0,0 +1,21 @@ +--- mono/mini/driver.c.orig 2018-08-24 08:17:13.000000000 -0700 ++++ mono/mini/driver.c 2021-11-27 20:03:33.006998000 -0800 +@@ -16,6 +16,8 @@ + #include + #endif + #if HAVE_SCHED_SETAFFINITY ++#include ++#define _WITH_CPU_SET_T + #include + #endif + #ifdef HAVE_UNISTD_H +@@ -1652,6 +1654,9 @@ + #if HAVE_SCHED_SETAFFINITY + if (!use_smp) { + unsigned long proc_mask = 1; ++#if defined(__FreeBSD_version) && __FreeBSD_version >= 1400042 ++#undef GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY ++#endif + #ifdef GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY + sched_setaffinity (getpid(), (gpointer)&proc_mask); + #else diff --git a/lang/mono/files/patch-mono_utils_mono-proclib.c b/lang/mono/files/patch-mono_utils_mono-proclib.c new file mode 100644 index 000000000000..94221193c985 --- /dev/null +++ b/lang/mono/files/patch-mono_utils_mono-proclib.c @@ -0,0 +1,10 @@ +--- mono/utils/mono-proclib.c.orig 2018-08-24 08:17:13.000000000 -0700 ++++ mono/utils/mono-proclib.c 2021-11-27 14:55:20.354869000 -0800 +@@ -17,6 +17,7 @@ + #include + #endif + #ifdef HAVE_SCHED_GETAFFINITY ++#define _WITH_CPU_SET_T + #include + #endif +