Skip to content

Commit

Permalink
Merge pull request #619 from pkubaj/patch-1
Browse files Browse the repository at this point in the history
Fix build on FreeBSD/powerpc64*
  • Loading branch information
robertdavidgraham authored Nov 2, 2023
2 parents baf0515 + 98ee0a6 commit 51d8887
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/smack1.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ unsigned long long __rdtsc(void)
}
return 0;
}
#elif defined(__powerpc64__)
unsigned long long __rdtsc(void)
{
unsigned long long rval;
__asm__ __volatile__("mfspr %%r3, 268": "=r" (rval));
return rval;
}
#elif defined(__aarch64__)
#define __rdtsc() 0
#else
Expand Down

0 comments on commit 51d8887

Please # to comment.