[LTP] [PATCH V2 06/32] sendfile: Use off64_t instead of __off64_t

Khem Raj raj.khem@gmail.com
Sat Jan 9 02:13:54 CET 2016


__off64_t is specific to glibc where as off64_t is widely available
Add _GNU_SOURCE for off64_t defines from sys/types.h
Fixes
<command-line>:0:7: error: unknown type name 'off64_t'
sendfile02.c:97:18: note: in expansion of macro 'OFF_T'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/sendfile/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/sendfile/Makefile b/testcases/kernel/syscalls/sendfile/Makefile
index df7b63f..1bd1b57 100644
--- a/testcases/kernel/syscalls/sendfile/Makefile
+++ b/testcases/kernel/syscalls/sendfile/Makefile
@@ -21,6 +21,6 @@ top_srcdir		?= ../../../..
 include $(top_srcdir)/include/mk/testcases.mk
 include $(abs_srcdir)/../utils/newer_64.mk
 
-%_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DOFF_T=__off64_t
+%_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DOFF_T=off64_t -D_GNU_SOURCE
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
2.7.0



More information about the Ltp mailing list