提交 4be61e6b 编写于 作者: A Alexander Monakov 提交者: Len Brown

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: NAlexander Monakov <amonakov@ispras.ru>
Tested-by: NLiwei Song <liwei.song@windriver.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 33eb8225
...@@ -12,6 +12,7 @@ turbostat : turbostat.c ...@@ -12,6 +12,7 @@ turbostat : turbostat.c
override CFLAGS += -O2 -Wall -I../../../include override CFLAGS += -O2 -Wall -I../../../include
override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"' override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
override CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.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 override CFLAGS += -D_FORTIFY_SOURCE=2
%: %.c %: %.c
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册