<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 22, 2019, 1:42 AM Sumit Garg <<a href="mailto:sumit.garg@linaro.org">sumit.garg@linaro.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Rafael,<br>
<br>
On Thu, 21 Mar 2019 at 01:34, Rafael David Tinoco<br>
<<a href="mailto:rafael.tinoco@linaro.org" target="_blank" rel="noreferrer">rafael.tinoco@linaro.org</a>> wrote:<br>
><br>
> I believe check_sync_file_range() logic, from commit c0dc8876fb1486ee85f6dd43e36ec5b3d9d9a4ed, should use a different names since glibc seems to be implementing the syscall wrapper in recent versions and a conflict exists for me at least:<br>
><br>
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  sync_file_range02.c   -lltp -o sync_file_range02<br>
> In file included from sync_file_range02.c:21:<br>
> ../../../../include/lapi/sync_file_range.h:24:20: error: conflicting types for ‘sync_file_range’<br>
>  static inline long sync_file_range(int fd, off64_t offset, off64_t nbytes,<br>
>                     ^~~~~~~~~~~~~~~<br>
> In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,<br>
>                  from /usr/include/fcntl.h:35,<br>
>                  from ../../../../include/tst_safe_macros.h:27,<br>
>                  from ../../../../include/tst_test.h:90,<br>
>                  from sync_file_range02.c:20:<br>
> /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:397:12: note: previous declaration of ‘sync_file_range’ was here<br>
>  extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,<br>
>             ^~~~~~~~~~~~~~~<br>
><br>
<br>
Did you ran configure check before building the test-case? Actually<br>
the commit you referred to adds functionality to use glibc syscall<br>
wrapper if present or else fallback to api defined in<br>
include/lapi/sync_file_range.h.<br>
<br>
See: "m4/ltp-sync_file_range.m4", "<a href="http://configure.ac" rel="noreferrer noreferrer" target="_blank">configure.ac</a>" for configure check.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">True, my bad. Thanks Submit. Sorry for the false warning.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-Sumit<br>
</blockquote></div></div></div>