From 6d7a7f4776711758cf5b59028378f01cd8eba493 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 13 Jun 2009 14:56:04 +0200 Subject: FreeBSD compatibility patches - update ipset and libpri to latest upstream --- package/gpsd/patches/patch-contrib_motosend_c | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/gpsd/patches/patch-contrib_motosend_c (limited to 'package/gpsd/patches/patch-contrib_motosend_c') diff --git a/package/gpsd/patches/patch-contrib_motosend_c b/package/gpsd/patches/patch-contrib_motosend_c new file mode 100644 index 000000000..c5f1b0162 --- /dev/null +++ b/package/gpsd/patches/patch-contrib_motosend_c @@ -0,0 +1,29 @@ +--- gpsd-2.39.orig/contrib/motosend.c 2008-06-26 21:08:36.000000000 +0200 ++++ gpsd-2.39/contrib/motosend.c 2009-06-13 09:12:46.000000000 +0200 +@@ -81,7 +81,7 @@ int main(int argc, char **argv) { + t = 0; n = 0; + while (1){ + usleep(1000); +- bzero(buf, BSIZ); ++ memset(buf, 0, BSIZ); + if ((l = read(fd, buf, BSIZ)) == -1) + if (!(EINTR == errno || EAGAIN == errno)) + err(1, "read"); +@@ -119,7 +119,7 @@ static int moto_send(int fd, char *type, + if ((buf = malloc(l+7)) == NULL) + return -1; + +- bzero(buf, l+7); ++ memset(buf, 0, l+7); + buf[0] = '@'; buf[1] = '@'; + buf[2] = type[0]; buf[3] = type[1]; + +@@ -171,7 +171,7 @@ int gpsd_hexpack(char *src, char *dst, i + if ((l < 1) || (l > len)) + return -1; + +- bzero(dst, len); ++ memset(dst, 0, len); + for (i = 0; i < l; i++) + if ((k = hex2bin(src+i*2)) != -1) + dst[i] = (char)(k & 0xff); -- cgit v1.2.3