Skip to content

Commit 4be61e6

Browse files
amonakovlenb
authored andcommitted
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>
1 parent 33eb822 commit 4be61e6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/power/x86/turbostat/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ turbostat : turbostat.c
1212
override CFLAGS += -O2 -Wall -I../../../include
1313
override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
1414
override CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
15+
override CFLAGS += -D_FILE_OFFSET_BITS=64
1516
override CFLAGS += -D_FORTIFY_SOURCE=2
1617

1718
%: %.c

0 commit comments

Comments
 (0)