include $(TOPDIR)/rules.mk
PKG_NAME:=htpdate
-PKG_VERSION:=1.0.1
+PKG_VERSION:=1.0.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.clevervest.com/htp/archive/c/
-PKG_MD5SUM:=a0c2b7a3e89a9fedb1ae8cba17928ec3
+PKG_MD5SUM:=a13ec89839c33965794ebf53c4e690db
include $(INCLUDE_DIR)/package.mk
/etc/default/htpdate
endef
-define Build/Compile
+define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)"
endef
-
-define Package/htpdate/install
+define Package/htpdate/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/htpdate $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/default/
- $(INSTALL_DATA) ./files/htpdate.default $(1)/etc/default/htpdate
+ $(INSTALL_CONF) ./files/htpdate.default $(1)/etc/default/htpdate
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) ./files/htpdate.init $(1)/etc/init.d/htpdate
endef
--- a/htpdate.c
+++ b/htpdate.c
-@@ -349,7 +349,7 @@
+@@ -359,7 +359,7 @@ static int htpdate_adjtimex( double drif
/* Read current kernel frequency */
tmx.modes = 0;
/* Calculate new frequency */
freq = (long)(65536e6 * drift);
-@@ -364,7 +364,7 @@
+@@ -377,7 +377,7 @@ static int htpdate_adjtimex( double drif
+ printlog( 1, "seteuid()" );
+ exit(1);
+ } else {
+- return( ntp_adjtime(&tmx) );
++ return( adjtimex(&tmx) );
+ }
- /* Become root */
- seteuid(0);
-- return( ntp_adjtime(&tmx) );
-+ return( adjtimex(&tmx) );
}
-
-