diff options
author | Cy Schubert <cy@FreeBSD.org> | 2021-11-27 17:52:24 -0800 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2021-11-29 12:55:18 -0800 |
commit | 83c19a7238e9f5f46a9186e3ce58d03585691e5d (patch) | |
tree | 75718d76394486b764fcff53c329dc62288a9527 /lang/mono | |
parent | 8b15d8d76e8a1b51ee7f2cd97752643efe7dfe0f (diff) | |
download | freebsd-ports-83c19a7238e9f5f46a9186e3ce58d03585691e5d.zip |
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
Diffstat (limited to 'lang/mono')
-rw-r--r-- | lang/mono/files/patch-mono_mini_driver.c | 21 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_utils_mono-proclib.c | 10 |
2 files changed, 31 insertions, 0 deletions
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 <signal.h> + #endif + #if HAVE_SCHED_SETAFFINITY ++#include <sys/param.h> ++#define _WITH_CPU_SET_T + #include <sched.h> + #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 <unistd.h> + #endif + #ifdef HAVE_SCHED_GETAFFINITY ++#define _WITH_CPU_SET_T + #include <sched.h> + #endif + |