mirror of
https://github.com/termux/termux-packages.git
synced 2025-01-06 03:46:41 +00:00
23 lines
878 B
Diff
23 lines
878 B
Diff
https://github.com/termux/termux-packages/issues/4319
|
|
|
|
--- a/include/my_rdtsc.h
|
|
+++ b/include/my_rdtsc.h
|
|
@@ -26,7 +26,7 @@
|
|
# ifndef __has_builtin
|
|
# define __has_builtin(x) 0 /* Compatibility with non-clang compilers */
|
|
# endif
|
|
-# if __has_builtin(__builtin_readcyclecounter)
|
|
+# if __has_builtin(__builtin_readcyclecounter) && !defined(__ANDROID__)
|
|
# elif defined _WIN32
|
|
# include <intrin.h>
|
|
# elif defined __i386__ || defined __x86_64__
|
|
@@ -152,7 +152,7 @@
|
|
*/
|
|
static inline ulonglong my_timer_cycles(void)
|
|
{
|
|
-# if __has_builtin(__builtin_readcyclecounter) && !defined (__aarch64__)
|
|
+# if __has_builtin(__builtin_readcyclecounter) && !defined (__aarch64__) && !defined(__ANDROID__)
|
|
#define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_AARCH64
|
|
return __builtin_readcyclecounter();
|
|
# elif defined _M_IX86 || defined _M_X64 || defined __i386__ || defined __x86_64__
|