util: check for process_vm_readv in C library
glibc-2.15 provides process_vm_readv, so trying to provide it ourselves with that version fails. * configure.ac (AC_CHECK_FUNCS): Add process_vm_readv. * util.c: Handle HAVE_PROCESS_VM_READV. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
0ed9947c14
commit
612659e41e
@ -236,6 +236,7 @@ AC_CHECK_FUNCS([ \
|
|||||||
sys_siglist \
|
sys_siglist \
|
||||||
_sys_siglist \
|
_sys_siglist \
|
||||||
stpcpy \
|
stpcpy \
|
||||||
|
process_vm_readv \
|
||||||
])
|
])
|
||||||
AC_CHECK_HEADERS([ \
|
AC_CHECK_HEADERS([ \
|
||||||
inttypes.h \
|
inttypes.h \
|
||||||
|
8
util.c
8
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.
|
/* 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"
|
* When libc is be updated, only "static bool process_vm_readv_not_supported"
|
||||||
* line should remain.
|
* line should remain.
|
||||||
@ -805,7 +810,8 @@ static ssize_t process_vm_readv(pid_t pid,
|
|||||||
static bool process_vm_readv_not_supported = 1;
|
static bool process_vm_readv_not_supported = 1;
|
||||||
# define process_vm_readv(...) (errno = ENOSYS, -1)
|
# define process_vm_readv(...) (errno = ENOSYS, -1)
|
||||||
#endif
|
#endif
|
||||||
/* end of hack */
|
|
||||||
|
#endif /* end of hack */
|
||||||
|
|
||||||
|
|
||||||
#define PAGMASK (~(PAGSIZ - 1))
|
#define PAGMASK (~(PAGSIZ - 1))
|
||||||
|
Loading…
Reference in New Issue
Block a user