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
--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
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
--- /dev/null
+--- 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]);