1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

graphics/oidn: Unbreak build on 12

Submitted by:	Tatsuki Makino <tatsuki_makino@hotmail.com>
This commit is contained in:
Yuri Victorovich 2023-05-29 17:17:03 -07:00
parent cd57f8a4bb
commit 4b9936fd2f
2 changed files with 14 additions and 3 deletions

View File

@ -14,7 +14,6 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt
ONLY_FOR_ARCHS= amd64
ONLY_FOR_ARCHS_REASON= Intel(R) MKL-DNN supports x86 64 bit platforms only (oidn contains a custom version of mkl-dnn, see math/mkl-dnn), and ISPC has a limited availability
BROKEN_FreeBSD_12= error: unknown type name 'cpuset_t'; did you mean 'cpusetid_t'?
FETCH_DEPENDS= git:devel/git \
git-lfs:devel/git-lfs

View File

@ -1,6 +1,18 @@
--- core/thread.h.orig 2023-05-24 17:03:47 UTC
+++ core/thread.h
@@ -130,7 +130,7 @@ OIDN_NAMESPACE_BEGIN
@@ -8,6 +8,11 @@
#if !defined(_WIN32)
#include <pthread.h>
#include <sched.h>
+ #if __FreeBSD__ <= 12
+ #include <sys/cpuset.h>
+ struct _cpuset;
+ typedef struct _cpuset cpu_set_t;
+ #endif
#if defined(__APPLE__)
#include <mach/thread_policy.h>
#endif
@@ -130,7 +135,7 @@ OIDN_NAMESPACE_BEGIN
std::vector<GROUP_AFFINITY> oldAffinities; // original thread affinities
};
@ -9,7 +21,7 @@
// -----------------------------------------------------------------------------------------------
// ThreadAffinity: Linux
@@ -153,8 +153,8 @@ OIDN_NAMESPACE_BEGIN
@@ -153,8 +158,8 @@ OIDN_NAMESPACE_BEGIN
void restore(int threadIndex);
private: