diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-01-06 10:01:36 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-01-06 10:01:36 +0100 |
commit | dc78a21a21568a389cf214ff29113f99286d644a (patch) | |
tree | ef919a6eedf02a20128dd2b8a7f008353698a1cc /package/rdate | |
parent | e96c649294fd763fa8631b866397a07b9434bbd3 (diff) | |
parent | 191b566ae5e66d2180924a4151f67e635fd12ad5 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/rdate')
-rw-r--r-- | package/rdate/Makefile | 1 | ||||
-rw-r--r-- | package/rdate/patches/patch-ntp_c | 50 | ||||
-rw-r--r-- | package/rdate/patches/patch-rdate_h | 11 | ||||
-rw-r--r-- | package/rdate/patches/patch-rfc868time_c | 11 |
4 files changed, 73 insertions, 0 deletions
diff --git a/package/rdate/Makefile b/package/rdate/Makefile index 140857170..619b5ad6a 100644 --- a/package/rdate/Makefile +++ b/package/rdate/Makefile @@ -18,6 +18,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RDATE,rdate,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIG_STYLE:= manual +TARGET_CPPFLAGS+= -D_GNU_SOURCE MAKE_FILE= GNUmakefile rdate-install: diff --git a/package/rdate/patches/patch-ntp_c b/package/rdate/patches/patch-ntp_c new file mode 100644 index 000000000..d36d421cd --- /dev/null +++ b/package/rdate/patches/patch-ntp_c @@ -0,0 +1,50 @@ +--- rdate.orig/ntp.c 2007-08-17 17:03:24.000000000 +0200 ++++ rdate/ntp.c 2013-12-30 23:07:06.000000000 +0100 +@@ -37,6 +37,7 @@ + #include <sys/time.h> + #include <netinet/in.h> + #include <arpa/inet.h> ++#include <sys/types.h> + + #include <ctype.h> + #include <err.h> +@@ -100,9 +101,9 @@ struct ntp_data { + double transmit; + double current; + double originate; +- u_int64_t xmitck; +- u_int64_t recvck; +- u_int32_t refid; ++ uint64_t xmitck; ++ uint64_t recvck; ++ uint32_t refid; + u_char status; + u_char version; + u_char mode; +@@ -268,7 +269,7 @@ write_packet(int fd, struct ntp_data *da + + packet[0] = ((nver ? nver : NTP_VERSION) << 3) | (NTP_MODE_CLIENT); + +- data->xmitck = (u_int64_t)arc4random() << 32 | arc4random(); ++ data->xmitck = (uint64_t)arc4random() << 32 | arc4random(); + + /* + * Send out a random 64-bit number as our transmit time. The NTP +@@ -286,7 +287,7 @@ write_packet(int fd, struct ntp_data *da + * the transmit field intelligible. + */ + +- memcpy(packet + NTP_TRANSMIT, &data->xmitck, sizeof (u_int64_t)); ++ memcpy(packet + NTP_TRANSMIT, &data->xmitck, sizeof (uint64_t)); + + data->originate = current_time(JAN_1970); + +@@ -437,7 +438,7 @@ unpack_ntp(struct ntp_data *data, u_char + data->transmit = d / NTP_SCALE; + + /* See write_packet for why this isn't an endian problem. */ +- memcpy(&data->recvck, packet + NTP_ORIGINATE, sizeof (u_int64_t)); ++ memcpy(&data->recvck, packet + NTP_ORIGINATE, sizeof (uint64_t)); + } + + /* diff --git a/package/rdate/patches/patch-rdate_h b/package/rdate/patches/patch-rdate_h new file mode 100644 index 000000000..33c4f1b3a --- /dev/null +++ b/package/rdate/patches/patch-rdate_h @@ -0,0 +1,11 @@ +--- rdate.orig/rdate.h 2007-08-16 12:38:52.000000000 +0200 ++++ rdate/rdate.h 2013-12-30 23:00:23.000000000 +0100 +@@ -10,7 +10,7 @@ + #endif + + #ifdef EXT_A4R +-extern u_int32_t arc4random(void); ++extern uint32_t arc4random(void); + #endif + + #ifdef __MirBSD__ diff --git a/package/rdate/patches/patch-rfc868time_c b/package/rdate/patches/patch-rfc868time_c new file mode 100644 index 000000000..b095278ba --- /dev/null +++ b/package/rdate/patches/patch-rfc868time_c @@ -0,0 +1,11 @@ +--- rdate.orig/rfc868time.c 2007-08-11 01:52:47.000000000 +0200 ++++ rdate/rfc868time.c 2013-12-30 23:07:29.000000000 +0100 +@@ -70,7 +70,7 @@ rfc868time_client (const char *hostname, + { + struct addrinfo hints, *res0, *res; + struct timeval old; +- u_int32_t tim; /* RFC 868 states clearly this is an uint32 */ ++ uint32_t tim; /* RFC 868 states clearly this is an uint32 */ + int s; + int error; + |