1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

multimedia/dav1d: unbreak TEST=on on FreeBSD < 13 after 17e9745fae

../tests/checkasm/checkasm.c:623:13: 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;
                       ^

PR:		270977
Reported by:	Ross McKelvie
This commit is contained in:
John Hein 2023-04-21 21:03:56 +00:00 committed by Jan Beich
parent dad58c1094
commit a504576965

View File

@ -0,0 +1,19 @@
Drop after FreeBSD 12.4 EOL around 2023-12-31
FreeBSD >= 13.1 pulls cpu_set_t from <sched.h> via <pthread.h>
https://cgit.freebsd.org/src/commit/?id=379bfb2aa9e9
--- tests/checkasm/checkasm.c.orig 2023-02-14 16:39:08 UTC
+++ tests/checkasm/checkasm.c
@@ -620,7 +620,11 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "checkasm: running on cpu %lu\n", affinity);
}
#elif defined(HAVE_PTHREAD_SETAFFINITY_NP) && defined(CPU_SET)
+#if defined(__FreeBSD__) && __FreeBSD__ < 13
+ cpuset_t set;
+#else
cpu_set_t set;
+#endif
CPU_ZERO(&set);
CPU_SET(affinity, &set);
if (pthread_setaffinity_np(pthread_self(), sizeof(set), &set)) {