0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-07-03 21:23:03 +00:00
Files
termux-packages/packages/oidn/0001-dummy-pthread-affinity.patch
Robert Kirkman af23f43ac0 bump(main/oidn): 2.3.3
- Context: This package is currently orphaned because @T-Dynamos wanted it for Blender in 2022, so it was added, but appears to have never used it despite it being in the main termux-packages repository because it was failing to build for aarch64: https://github.com/termux/termux-packages/pull/11800#issuecomment-1236346483
  - However, the reason I am bumping it is because I want it for an improved Blender package in TUR, but awkwardly, its package already exists unused in the main repository, so in order to build against it in TUR, I must first edit the main repository so that it propagates into TUR.

- No longer failing to build for aarch64

- `0002-fix-ambiguous-user.patch` is no longer necessary
2025-06-06 03:32:22 -05:00

24 lines
682 B
Diff

--- a/core/thread.cpp
+++ b/core/thread.cpp
@@ -16,6 +16,20 @@
#include "thread.h"
#include <fstream>
+#if defined(__BIONIC__)
+static inline int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize,
+ cpu_set_t *cpuset) {
+ assert(pthread_equal(pthread_self(), thread));
+ return sched_setaffinity(0, cpusetsize, cpuset);
+}
+
+static inline int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize,
+ cpu_set_t *cpuset) {
+ assert(pthread_equal(pthread_self(), thread));
+ return sched_getaffinity(0, cpusetsize, cpuset);
+}
+#endif
+
OIDN_NAMESPACE_BEGIN
#if defined(_WIN32)