summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/spidermonkey/files/spidermonkey-1.8.5-perf_event-check.patch')
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-perf_event-check.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-perf_event-check.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-perf_event-check.patch
new file mode 100644
index 00000000000..66475b6c34c
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-perf_event-check.patch
@@ -0,0 +1,21 @@
+--- a/js/src/configure.in 2012-11-01 19:42:20.130330321 +0100
++++ b/js/src/configure.in 2012-11-01 20:34:03.561351492 +0100
+@@ -3477,7 +3477,16 @@
+ esac
+
+ dnl Performance measurement headers.
+-AC_CHECK_HEADER(linux/perf_event.h, HAVE_LINUX_PERF_EVENT_H=1)
++AC_CHECK_HEADER(linux/perf_event.h,
++ [AC_CACHE_CHECK(for perf_event_open system call,ac_cv_perf_event_open,
++ [AC_TRY_COMPILE([#include <sys/syscall.h>],[return sizeof(__NR_perf_event_open);],
++ ac_cv_perf_event_open=yes,
++ ac_cv_perf_event_open=no)])])
++if test "$ac_cv_perf_event_open" = "yes"; then
++ HAVE_LINUX_PERF_EVENT_H=1
++else
++ HAVE_LINUX_PERF_EVENT_H=
++fi
+ AC_SUBST(HAVE_LINUX_PERF_EVENT_H)
+
+ dnl Checks for libraries.
+