As the build break was occurred on eralier distro versions, the tests in lib6 directory has been excluded. Now autoconf is introduced. We can include them again.
Signed-off-by: Mitsuru Chinen <[email protected]> --- configure.ac | 1 + include/config.h.default | 3 +++ testcases/network/Makefile | 3 +-- testcases/network/lib6/asapi_06.c | 10 ++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 05df57d..e137d5b 100644 --- a/configure.ac +++ b/configure.ac @@ -9,5 +9,6 @@ LTP_CHECK_SYSCALL_SIGNALFD m4_include([m4/ltp-modify_ldt.m4]) LTP_CHECK_SYSCALL_MODIFY_LDT +AC_CHECK_HEADERS([ifaddrs.h]) AC_OUTPUT diff --git a/include/config.h.default b/include/config.h.default index 6c235fc..9125d85 100644 --- a/include/config.h.default +++ b/include/config.h.default @@ -11,3 +11,6 @@ #define HAVE_SYS_SIGNALFD_H 1 #define HAVE_SIGNALFD 1 #define HAVE_SIGNALFD_SIGINFO_SSI_SIGNO 1 + +/* ifaddrs.h is in glibc-2.3+ */ +#define HAVE_IFADDRS_H 1 diff --git a/testcases/network/Makefile b/testcases/network/Makefile index eff9765..fc92b1e 100644 --- a/testcases/network/Makefile +++ b/testcases/network/Makefile @@ -1,5 +1,4 @@ -#SUBDIRS = `ls */Makefile | sed "s/Makefile//g"` -SUBDIRS = `ls */Makefile | sed "s/Makefile//g" | grep -v lib6` # Exclude this directory since it breaks on earlier distro versions +SUBDIRS = `ls */Makefile | sed "s/Makefile//g"` all: @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i ; done diff --git a/testcases/network/lib6/asapi_06.c b/testcases/network/lib6/asapi_06.c index 99694ce..8eaf6d6 100644 --- a/testcases/network/lib6/asapi_06.c +++ b/testcases/network/lib6/asapi_06.c @@ -34,6 +34,8 @@ * */ +#include "config.h" + #include <stdio.h> #include <unistd.h> #include <errno.h> @@ -49,7 +51,9 @@ #include <sys/socket.h> #include <net/if.h> #include <sys/ioctl.h> +#ifdef HAVE_IFADDRS_H #include <ifaddrs.h> +#endif #include <arpa/inet.h> #include "test.h" @@ -426,6 +430,7 @@ so_test(struct soent *psoe) #define IPV6_ADDR_LINK 2 #define IPV6_ADDR_GLOBAL 3 +#ifdef HAVE_IFADDRS_H static int ipv6_addr_scope(struct in6_addr *pin6) { if ((ntohl(pin6->s6_addr32[0]) & 0xFFC00000) == 0xFE800000) @@ -434,9 +439,11 @@ static int ipv6_addr_scope(struct in6_addr *pin6) return IPV6_ADDR_NODE; return IPV6_ADDR_GLOBAL; } +#endif /* HAVE_IFADDRS_H */ int getsock(char *tname, struct sockaddr_in6 *psin6_arg, int scope) { +#ifdef HAVE_IFADDRS_H static struct ifaddrs *pifa_head; struct ifaddrs *pifa; struct sockaddr_in6 *psin6; @@ -512,6 +519,9 @@ int getsock(char *tname, struct sockaddr_in6 *psin6_arg, int scope) tname, scopestr); } return -1; +#else /* HAVE_IFADDRS_H */ + return -1; +#endif } #ifdef notyet -- 1.5.6 ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
