]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Fix LIBNUMA build with glibc 2.12 and older.
authorVinson Lee <vlee@twitter.com>
Wed, 13 Mar 2013 22:34:24 +0000 (15:34 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 14 Mar 2013 11:06:21 +0000 (08:06 -0300)
commitb39492a7efaa5a8e69d9a3ebc1e0aaf00d0bdf71
tree7bfb7c9196c77f004eb23248f62c851dbbeb46c2
parenta4990783027dec24a9ecaa50d163cc169e6a61f5
perf tools: Fix LIBNUMA build with glibc 2.12 and older.

The tokens MADV_HUGEPAGE and MADV_NOHUGEPAGE are not available with
glibc 2.12 and older. Define these tokens if they are not already
defined.

This patch fixes these build errors with older versions of glibc.

    CC bench/numa.o
bench/numa.c: In function ‘alloc_data’:
bench/numa.c:334: error: ‘MADV_HUGEPAGE’ undeclared (first use in this function)
bench/numa.c:334: error: (Each undeclared identifier is reported only once
bench/numa.c:334: error: for each function it appears in.)
bench/numa.c:341: error: ‘MADV_NOHUGEPAGE’ undeclared (first use in this function)
make: *** [bench/numa.o] Error 1

Signed-off-by: Vinson Lee <vlee@twitter.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Irina Tirdea <irina.tirdea@intel.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1363214064-4671-2-git-send-email-vlee@twitter.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/bench/bench.h