Fix chrony compilation with gcc4 and installation (#1482)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6608 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d825411775
commit
10a646eccb
@ -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
|
||||
|
20
net/chrony/patches/003-gcc4.patch
Normal file
20
net/chrony/patches/003-gcc4.patch
Normal file
@ -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]);
|
Loading…
x
Reference in New Issue
Block a user