From 39ade2b9e705f30d64484beec843cd7dd380c1ea Mon Sep 17 00:00:00 2001 From: Dirk Neukirchen <dirkneukirc...@web.de> Date: Sun, 25 May 2014 10:09:57 +0000 Subject: [PATCH] ngircd: update to v21.1
- update to v21.1 - upstream introduced a getaddrinfo check that is not working when cross compiling - this upstream commit b8433e9261c516d7b8743b33681050b6666192e5 is reverted because OpenWrt does not have anything to do with AIX and it's broken implementation v2: make patch apply to openwrt packages repo Signed-off-by: Dirk Neukirchen <dirkneukirc...@web.de> --- net/ngircd/Makefile | 12 +++- .../patches/001-cross_compile_getaddrinfo.patch | 73 ++++++++++++++++++++++ 2 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 net/ngircd/patches/001-cross_compile_getaddrinfo.patch diff --git a/net/ngircd/Makefile b/net/ngircd/Makefile index ab9795d..0d5f5df 100644 --- a/net/ngircd/Makefile +++ b/net/ngircd/Makefile @@ -8,15 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ngircd -PKG_VERSION:=18 +PKG_VERSION:=21.1 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:= \ http://ngircd.barton.de/pub/ngircd/ \ ftp://ftp.berlios.de/pub/ngircd/ -PKG_MD5SUM:=4958c8b2d128cf3e9888af3f782892a1 +PKG_MD5SUM:=e24342336d23df8d25cc3780c3903ead +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) @@ -78,6 +79,11 @@ ifeq ($(BUILD_VARIANT),nossl) --without-openssl endif +define Build/Configure + ( cd $(PKG_BUILD_DIR); ./autogen.sh ); + $(call Build/Configure/Default) +endef + define Package/ngircd/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ngircd $(1)/usr/sbin/ diff --git a/net/ngircd/patches/001-cross_compile_getaddrinfo.patch b/net/ngircd/patches/001-cross_compile_getaddrinfo.patch new file mode 100644 index 0000000..9766e80 --- /dev/null +++ b/net/ngircd/patches/001-cross_compile_getaddrinfo.patch @@ -0,0 +1,73 @@ +--- a/configure.ng ++++ b/configure.ng +@@ -93,35 +93,6 @@ AC_DEFUN([GCC_STACK_PROTECT_CC],[ + fi + ]) + +-AC_DEFUN([WORKING_GETADDRINFO],[ +- AC_CHECK_FUNCS([getaddrinfo],[ +- AC_MSG_CHECKING([whether getaddrinfo() works]) +- AC_TRY_RUN([ +-#include <stdio.h> +-#include <sys/types.h> +-#include <sys/socket.h> +-#include <netdb.h> +-int +-main(int argc, char **argv) +-{ +- struct addrinfo hints, *ai; +- memset(&hints, 0, sizeof(hints)); +- hints.ai_flags = AI_PASSIVE; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_family = PF_UNSPEC; +- if(getaddrinfo(NULL, "0", &hints, &ai) != 0) +- return 1; +- return 0; +-} +- ],[ +- AC_DEFINE([HAVE_WORKING_GETADDRINFO], 1, [getaddrinfo(0)]) +- AC_MSG_RESULT(yes) +- ],[ +- AC_MSG_RESULT(no) +- ]) +- ]) +-]) +- + if test "$GCC" = "yes"; then + # We are using the GNU C compiler. Good! + CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes" +@@ -217,11 +188,10 @@ AC_CHECK_FUNCS([ \ + + # Optional functions + AC_CHECK_FUNCS_ONCE([ +- arc4random arc4random_stir gai_strerror getnameinfo inet_aton \ ++ arc4random arc4random_stir gai_strerror getaddrinfo getnameinfo inet_aton \ + sigaction sigprocmask snprintf vsnprintf strdup strndup strlcpy strlcat \ + strtok_r unsetenv waitpid]) + +-WORKING_GETADDRINFO + + # -- Configuration options -- + +--- a/src/ngircd/resolve.c ++++ b/src/ngircd/resolve.c +@@ -242,7 +242,7 @@ ForwardLookup(const char *hostname, arra + { + ng_ipaddr_t addr; + +-#ifdef HAVE_WORKING_GETADDRINFO ++#ifdef HAVE_GETADDRINFO + int res; + struct addrinfo *a, *ai_results; + static struct addrinfo hints; +--- a/src/ipaddr/ng_ipaddr.c ++++ b/src/ipaddr/ng_ipaddr.c +@@ -23,7 +23,7 @@ + GLOBAL bool + ng_ipaddr_init(ng_ipaddr_t *addr, const char *ip_str, UINT16 port) + { +-#ifdef HAVE_WORKING_GETADDRINFO ++#ifdef HAVE_GETADDRINFO + int ret; + char portstr[64]; + struct addrinfo *res0; -- 2.0.0.rc4
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel