diff options
author | Felix Fietkau <nbd@openwrt.org> | 2005-04-04 21:05:07 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2005-04-04 21:05:07 +0000 |
commit | 563fe2b05016b1dcf428ec5327db4a09835ad027 (patch) | |
tree | a10c8ae1875e5a1ce39b725f8d4c700ff8eae1d4 /openwrt/toolchain | |
parent | e560f1314158ed27b287a419b06f6a2dd30bada0 (diff) | |
download | mtk-20170518-563fe2b05016b1dcf428ec5327db4a09835ad027.zip mtk-20170518-563fe2b05016b1dcf428ec5327db4a09835ad027.tar.gz mtk-20170518-563fe2b05016b1dcf428ec5327db4a09835ad027.tar.bz2 |
fix ipv6 host name lookup from /etc/hosts
SVN-Revision: 559
Diffstat (limited to 'openwrt/toolchain')
-rw-r--r-- | openwrt/toolchain/uClibc/Makefile | 2 | ||||
-rw-r--r-- | openwrt/toolchain/uClibc/patches/inet6_hosts_resolve.patch | 24 | ||||
-rw-r--r-- | openwrt/toolchain/uClibc/uclibc.mk | 1 |
3 files changed, 26 insertions, 1 deletions
diff --git a/openwrt/toolchain/uClibc/Makefile b/openwrt/toolchain/uClibc/Makefile index 06d7487..4fa048c 100644 --- a/openwrt/toolchain/uClibc/Makefile +++ b/openwrt/toolchain/uClibc/Makefile @@ -7,4 +7,4 @@ prepare: uclibc-configured compile: $(UCLIBC_DIR)/lib/libc.a install: uclibc $(STRIP) $(TARGET_DIR)/lib/*.so -clean: uclibc-clean +clean: uclibc-toolclean diff --git a/openwrt/toolchain/uClibc/patches/inet6_hosts_resolve.patch b/openwrt/toolchain/uClibc/patches/inet6_hosts_resolve.patch new file mode 100644 index 0000000..fd1aaa1 --- /dev/null +++ b/openwrt/toolchain/uClibc/patches/inet6_hosts_resolve.patch @@ -0,0 +1,24 @@ +diff -urN uClibc-0.9.27.old/libc/inet/resolv.c uClibc-0.9.27/libc/inet/resolv.c +--- uClibc-0.9.27.old/libc/inet/resolv.c 2005-01-12 08:59:21.000000000 +0100 ++++ uClibc-0.9.27/libc/inet/resolv.c 2005-04-04 22:14:38.000000000 +0200 +@@ -2029,7 +2029,7 @@ + int old_errno = errno; /* Save the old errno and reset errno */ + __set_errno(0); /* to check for missing /etc/hosts. */ + +- if ((i=__get_hosts_byname_r(name, AF_INET, result_buf, ++ if ((i=__get_hosts_byname_r(name, AF_INET6, result_buf, + buf, buflen, result, h_errnop))==0) + return i; + switch (*h_errnop) { +diff -urN uClibc-0.9.27.old/libc/inet/resolv.c uClibc-0.9.27/libc/inet/resolv.c +--- uClibc-0.9.27.old/libc/inet/resolv.c 2005-04-04 22:16:54.000000000 +0200 ++++ uClibc-0.9.27/libc/inet/resolv.c 2005-04-04 22:46:59.000000000 +0200 +@@ -1513,7 +1513,7 @@ + } else { + DPRINTF("Error\n"); + ret=TRY_AGAIN; +- break; /* bad ip address */ ++ continue; /* bad ip address, ignore */ + } + + if (action!=GETHOSTENT) { diff --git a/openwrt/toolchain/uClibc/uclibc.mk b/openwrt/toolchain/uClibc/uclibc.mk index f7b6d2b..01c1a00 100644 --- a/openwrt/toolchain/uClibc/uclibc.mk +++ b/openwrt/toolchain/uClibc/uclibc.mk @@ -38,6 +38,7 @@ $(DL_DIR)/$(UCLIBC_SOURCE): $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) mkdir -p $(TOOL_BUILD_DIR) bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - + $(PATCH) $(UCLIBC_DIR) ./patches touch $(UCLIBC_DIR)/.unpacked $(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked |