summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-laptop/linux-phc/files/linux-phc-0.2.9-msr_h-fix.patch')
-rw-r--r--app-laptop/linux-phc/files/linux-phc-0.2.9-msr_h-fix.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/app-laptop/linux-phc/files/linux-phc-0.2.9-msr_h-fix.patch b/app-laptop/linux-phc/files/linux-phc-0.2.9-msr_h-fix.patch
new file mode 100644
index 000000000..c3df0d117
--- /dev/null
+++ b/app-laptop/linux-phc/files/linux-phc-0.2.9-msr_h-fix.patch
@@ -0,0 +1,20 @@
+--- linux-phc-0.2.9-orig/utils/measurefreq/src/measurefreq.cpp 2006-07-15 08:25:57.000000000 +0300
++++ linux-phc-0.2.9/utils/measurefreq/src/measurefreq.cpp 2007-04-07 21:56:24.000000000 +0300
+@@ -25,7 +25,6 @@
+
+ #include <iostream>
+ #include <cstdlib>
+-#include <asm/msr.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+ #include <math.h>
+@@ -38,6 +37,9 @@
+ #define DEFAULT_MEASURE_TIME 1000000
+ #define BUSY_LOOP_COUNT 10000000
+
++// Define rdtsc() which was in asm/msr.h
++#define rdtsc(low,high) \
++ __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
+
+ enum WaitType
+ {