The preadv/pwritev symbols weren't added to glibc until the 2.10 release,
so trying to build the uio test leads to link failures. Add configure
tests and update uio.test to handle this.
* configure.ac (AC_CHECK_FUNCS): Add preadv/pwritev.
* tests/uio.c: Include config.h.
(main): Check for HAVE_PREADV and HAVE_PWRITEV.
* tests/uio.test: Check exit status of uio helper.
if_indextoname
inet_ntop
prctl
+ preadv
process_vm_readv
+ pwritev
sendmsg
sigaction
stpcpy
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <fcntl.h>
#include <unistd.h>
#include <sys/uio.h>
int
main(void)
{
+#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV)
const off_t offset = 0xdefaceddeadbeefLL;
int fd;
char buf[4];
assert(!close(fd));
return 0;
+#else
+ return 77;
+#endif
}
check_prog grep
check_prog rm
-./uio ||
- fail_ 'uio failed'
+./uio || {
+ if [ $? -eq 77 ]; then
+ framework_skip_ 'preadv/pwritev syscalls are not available'
+ else
+ fail_ 'uio failed'
+ fi
+}
args="-edesc ./uio"
$STRACE $args > $LOG 2>&1 || {