mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
tools/power turbostat: Build with _FILE_OFFSET_BITS=64
For compatibility reasons, Glibc off_t is a 32-bit type on 32-bit x86 unless _FILE_OFFSET_BITS=64 is defined. Add this define, as otherwise reading MSRs with index 0x80000000 and above attempts a pread with a negative offset, which fails. Signed-off-by: Alexander Monakov <amonakov@ispras.ru> Tested-by: Liwei Song <liwei.song@windriver.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
33eb82251a
commit
4be61e6b76
1 changed files with 1 additions and 0 deletions
|
@ -12,6 +12,7 @@ turbostat : turbostat.c
|
|||
override CFLAGS += -O2 -Wall -I../../../include
|
||||
override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
|
||||
override CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
|
||||
override CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
override CFLAGS += -D_FORTIFY_SOURCE=2
|
||||
|
||||
%: %.c
|
||||
|
|
Loading…
Reference in a new issue