]> git.proxmox.com Git - mirror_ovs.git/blobdiff - lib/perf-counter.c
autoconf: check for linux/perf_event.h
[mirror_ovs.git] / lib / perf-counter.c
index 4188f6b86dc3b2046ff85b8596e35bd5db73c2df..a6c496528df30041e56427651094e343b8184481 100644 (file)
@@ -15,7 +15,9 @@
  */
 
 /* This implementation only applies to the Linux platform.  */
-#ifdef __linux__
+
+#include <config.h>
+#if defined(__linux__) && defined(HAVE_PERF_EVENT_H)
 
 #include <stddef.h>
 #include <sys/types.h>
@@ -24,7 +26,6 @@
 #include <sys/ioctl.h>
 #include <linux/perf_event.h>
 #include <asm/unistd.h>
-#include <config.h>
 #include "dynamic-string.h"
 #include "openvswitch/vlog.h"
 #include "perf-counter.h"