perf-counters: fix non-linux build
authorAndy Zhou <azhou@nicira.com>
Tue, 14 Apr 2015 19:28:50 +0000 (12:28 -0700)
committerAndy Zhou <azhou@nicira.com>
Tue, 14 Apr 2015 21:08:47 +0000 (14:08 -0700)
Commit '97a3c43515e' misses definitions for non-Linux platforms thus
broke builds for any non-Linux platform.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
lib/perf-counter.h

index b5b72e5..c9abf72 100644 (file)
@@ -131,6 +131,16 @@ char *perf_counters_to_string(void);
 
 #define PERF_FUNCTON_COUNT_BEGIN
 #define PERF_FUNCTON_COUNT_END
+
+static inline void perf_counters_init(void) {}
+static inline void perf_counters_destroy(void) {}
+static inline void perf_counters_clear(void) {}
+static inline char *
+perf_counters_to_string(void)
+{
+    return xstrdup("Not Supported on this platform. Only available on Linux.");
+}
+
 #endif
 
 #endif