From d27e80c0c41a82b09ebe8a7b0d7c561e13125647 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 18 Mar 2007 17:33:57 +0000 Subject: [PATCH] Fix chrony compilation with gcc4 and installation (#1482) SVN-Revision: 6608 --- net/chrony/Makefile | 10 +++++----- net/chrony/patches/003-gcc4.patch | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 net/chrony/patches/003-gcc4.patch diff --git a/net/chrony/Makefile b/net/chrony/Makefile index 2b05ef98b8..6a67cc6766 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -25,13 +25,12 @@ include $(INCLUDE_DIR)/package.mk define Package/chrony SECTION:=net CATEGORY:=Network + DEPENDS:=+libreadline +libncurses TITLE:=NTP client/server for on-demand connections DESCRIPTION:=\ A NTP implementation that has been specifically written to work well in the case of an intermittent \ (e.g. dial-on-demand) connection to the network where your NTP servers are. URL:=http://chrony.sunsite.dk/ - MAINTAINER:=Richard Kunze - DEPENDS:=uclibc libreadline libncurses endef define Package/chrony/conffiles @@ -43,7 +42,8 @@ define Build/Configure --target=$(GNU_TARGET_NAME) \ --prefix=/usr \ --with-readline-includes=$(STAGING_DIR)/usr/include \ - --with-readline-library=$(STAGING_DIR)/usr/lib \ ) + --with-readline-library=$(STAGING_DIR)/usr/lib \ + ) endef define Build/Compile @@ -55,8 +55,8 @@ endef define Package/chrony/install $(INSTALL_DIR) $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)$(PKG_INSTALL_DIR)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)$(PKG_INSTALL_DIR)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)/usr/bin $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DIR) $(1)/etc/chrony diff --git a/net/chrony/patches/003-gcc4.patch b/net/chrony/patches/003-gcc4.patch new file mode 100644 index 0000000000..b92268c64a --- /dev/null +++ b/net/chrony/patches/003-gcc4.patch @@ -0,0 +1,20 @@ +--- chrony-1.21/addrfilt.c.orig 2005-08-11 22:32:54.000000000 +0200 ++++ chrony-1.21/addrfilt.c 2005-09-04 11:05:54.000000000 +0200 +@@ -45,7 +45,7 @@ + + struct _TableNode; + +-typedef struct _TableNode ExtendedTable[TABLE_SIZE]; ++typedef struct _TableNode *ExtendedTable; + + typedef enum {DENY, ALLOW, AS_PARENT} State; + +@@ -124,7 +124,7 @@ + + if (node->extended == NULL) { + +- node->extended = MallocNew(ExtendedTable); ++ node->extended = MallocArray(ExtendedTable, TABLE_SIZE); + + for (i=0; iextended))[i]); -- 2.30.2