mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2025-12-27 22:20:31 +00:00
28 lines
670 B
Diff
28 lines
670 B
Diff
diff --git a/Source/Tests/VDSO_Emulation.cpp b/Source/Tests/VDSO_Emulation.cpp
|
|
index d03cfa4b6..cb12a352a 100644
|
|
--- a/Source/Tests/VDSO_Emulation.cpp
|
|
+++ b/Source/Tests/VDSO_Emulation.cpp
|
|
@@ -12,6 +12,22 @@
|
|
#include <sys/time.h>
|
|
#include <unistd.h>
|
|
|
|
+#ifdef TERMUX_BUILD
|
|
+// getcpu doesn't exist in termux. Expectation is to use sched_getcpu.
|
|
+#include <sched.h>
|
|
+int getcpu(uint32_t *cpu, uint32_t *node) {
|
|
+ if (cpu) {
|
|
+ *cpu = ::sched_getcpu();
|
|
+ }
|
|
+ if (node) {
|
|
+ // No node information
|
|
+ *node = 0;
|
|
+ }
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+#endif
|
|
+
|
|
namespace FEX::VDSO {
|
|
using TimeType = decltype(::time)*;
|
|
using GetTimeOfDayType = decltype(::gettimeofday)*;
|