summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlexander Monakov <amonakov@ispras.ru>2020-08-23 23:27:02 +0300
committerLen Brown <len.brown@intel.com>2020-09-03 13:59:10 -0400
commit4be61e6b769fc3f97b58870aa4258e27968f07e1 (patch)
tree9c7c4c2e1446c8f8808dbc879cabeff2b11ac219 /tools
parent33eb82251af9be47a625ca1578f44e596a3a0ca9 (diff)
downloadlinux-stable-4be61e6b769fc3f97b58870aa4258e27968f07e1.tar.gz
linux-stable-4be61e6b769fc3f97b58870aa4258e27968f07e1.tar.bz2
linux-stable-4be61e6b769fc3f97b58870aa4258e27968f07e1.zip
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/power/x86/turbostat/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
index d08765531bcb..f3e3c94ab9bd 100644
--- a/tools/power/x86/turbostat/Makefile
+++ b/tools/power/x86/turbostat/Makefile
@@ -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