• Vineet Gupta's avatar
    perf tools: Provide stub for missing pthread_attr_setaffinity_np · 459a3df7
    Vineet Gupta authored
    
    
    uClibc Linuxthreads.old doesn't support the pthread_attr_setaffinity_np()
    functioo:
    
       ----------------->8-----------------------
      CC       bench/futex-hash.o
      CC       bench/futex-wake.o
    bench/futex-hash.c: In function 'bench_futex_hash':
    bench/futex-hash.c:161:3: error: implicit declaration of function
    'pthread_attr_setaffinity_np' [-Werror=implicit-function-declaration]
       ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t),
    &cpu);
       ^
    bench/futex-hash.c:161:3: error: nested extern declaration of
    'pthread_attr_setaffinity_np' [-Werror=nested-externs]
       ----------------->8-----------------------
    
    So introduce a test to check that and if not available provide a stub.
    Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
    Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
    Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/14211566...
    459a3df7
Makefile 3.24 KB