diff options
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | newkernel.patch | 15 |
3 files changed, 26 insertions, 5 deletions
@@ -1,5 +1,3 @@ -# Generated by mksrcinfo v8 -# Sat Apr 22 16:17:07 UTC 2017 pkgbase = ntpclient pkgdesc = A simple NTP (RFC-1305) client pkgver = 2015.365 @@ -10,7 +8,8 @@ pkgbase = ntpclient license = GPL2 depends = glibc source = http://doolittle.icarus.com/ntpclient/ntpclient_2015_365.tar.gz + source = newkernel.patch sha1sums = 7513df5b5b64797c5fac27d7c1161f53a4675b26 + sha1sums = 169d1938f31247d869cd09c42e50a2ffcca9ef7a pkgname = ntpclient - @@ -8,8 +8,15 @@ url='http://doolittle.icarus.com/ntpclient/' arch=(x86_64 i686) depends=(glibc) license=(GPL2) -source=(http://doolittle.icarus.com/ntpclient/ntpclient_${pkgver/./_}.tar.gz) -sha1sums=('7513df5b5b64797c5fac27d7c1161f53a4675b26') +source=(http://doolittle.icarus.com/ntpclient/ntpclient_${pkgver/./_}.tar.gz + newkernel.patch) +sha1sums=('7513df5b5b64797c5fac27d7c1161f53a4675b26' + '169d1938f31247d869cd09c42e50a2ffcca9ef7a') + +prepare() { + cd ntpclient-${pkgver%.*} + patch < ../newkernel.patch +} build() { cd ntpclient-${pkgver%.*} diff --git a/newkernel.patch b/newkernel.patch new file mode 100644 index 000000000000..d5358ab41f1f --- /dev/null +++ b/newkernel.patch @@ -0,0 +1,15 @@ +diff --git a/ntpclient.c b/ntpclient.c +index fb89ffe..ce818fc 100644 +--- a/ntpclient.c ++++ b/ntpclient.c +@@ -251,8 +251,8 @@ static void get_packet_timestamp(int usd, struct ntptime *udp_arrival_ntp) + { + #ifdef PRECISION_SIOCGSTAMP + struct timeval udp_arrival; +- if ( ioctl(usd, SIOCGSTAMP, &udp_arrival) < 0 ) { +- perror("ioctl-SIOCGSTAMP"); ++ if ( ioctl(usd, SIOCGSTAMP_OLD, &udp_arrival) < 0 ) { ++ perror("ioctl-SIOCGSTAMP_OLD"); + ntpc_gettime(&udp_arrival_ntp->coarse, &udp_arrival_ntp->fine); + } else { + udp_arrival_ntp->coarse = udp_arrival.tv_sec + JAN_1970; |