glibc-2.15 provides process_vm_readv, so trying to provide this ourselves with that version fails: util.c:797:16: error: static declaration of 'process_vm_readv' follows non-static declaration /usr/include/bits/uio.h:58:16: note: previous declaration of 'process_vm_readv' was here
Add a configure check for the func. Signed-off-by: Mike Frysinger <vap...@gentoo.org> --- configure.ac | 1 + util.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 789a997..55c7682 100644 --- a/configure.ac +++ b/configure.ac @@ -236,6 +236,7 @@ AC_CHECK_FUNCS([ \ sys_siglist \ _sys_siglist \ stpcpy \ + process_vm_readv \ ]) AC_CHECK_HEADERS([ \ inttypes.h \ diff --git a/util.c b/util.c index b6cdf9a..bd166d2 100644 --- a/util.c +++ b/util.c @@ -776,6 +776,11 @@ dumpstr(struct tcb *tcp, long addr, int len) } +#ifdef HAVE_PROCESS_VM_READV +/* C library supports this, but the kernel might not. */ +static bool process_vm_readv_not_supported = 0; +#else + /* Need to do this since process_vm_readv() is not yet available in libc. * When libc is be updated, only "static bool process_vm_readv_not_supported" * line should remain. @@ -805,7 +810,8 @@ static ssize_t process_vm_readv(pid_t pid, static bool process_vm_readv_not_supported = 1; # define process_vm_readv(...) (errno = ENOSYS, -1) #endif -/* end of hack */ + +#endif /* end of hack */ #define PAGMASK (~(PAGSIZ - 1)) -- 1.7.8.4 ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel