[ovs-dev] [PATCH] perf-counters: fix non-linux build

Andy Zhou azhou at nicira.com
Tue Apr 14 21:09:33 UTC 2015


Pushed. thanks for review.

On Tue, Apr 14, 2015 at 1:23 PM, Gurucharan Shetty <shettyg at nicira.com> wrote:
> On Tue, Apr 14, 2015 at 12:37 PM, Andy Zhou <azhou at nicira.com> wrote:
>> Commit '97a3c43515e' misses definitions for non-Linux platforms thus
>> broke builds for any non-Linux platform.
>>
>> Signed-off-by: Andy Zhou <azhou at nicira.com>
> Fixes the build on Windows.
> Acked-by: Gurucharan Shetty <gshetty at nicira.com>
>
>> ---
>>  lib/perf-counter.h | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/lib/perf-counter.h b/lib/perf-counter.h
>> index b5b72e5..c9abf72 100644
>> --- a/lib/perf-counter.h
>> +++ b/lib/perf-counter.h
>> @@ -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
>> --
>> 1.9.1
>>
>> _______________________________________________
>> dev mailing list
>> dev at openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list