Fix chrony compilation with gcc4 and installation (#1482)
authorFlorian Fainelli <florian@openwrt.org>
Sun, 18 Mar 2007 17:33:57 +0000 (17:33 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 18 Mar 2007 17:33:57 +0000 (17:33 +0000)
SVN-Revision: 6608

net/chrony/Makefile
net/chrony/patches/003-gcc4.patch [new file with mode: 0644]

index 2b05ef98b8a62a28912236970b31b80de1c0ea07..6a67cc6766088608073da8a9b2f8a87843739bd9 100644 (file)
@@ -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 <kunze-openwrt-chrony@tivano.de>
-  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 (file)
index 0000000..b92268c
--- /dev/null
@@ -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; i<TABLE_SIZE; i++) {
+       child_node = &((*(node->extended))[i]);