summaryrefslogtreecommitdiff
path: root/gps2udp.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-08-15 21:25:59 -0700
committerGary E. Miller <gem@rellim.com>2016-08-15 21:25:59 -0700
commit4c8a74fa031d3356183e1562b7a9738d70e9f3ce (patch)
tree5eda27c4923d5c84b244fcdd41c5a8e2bd08fa61 /gps2udp.c
parent0260b7d8004e4c16928ef8d8e1bf6f6c9de8e0c8 (diff)
downloadgpsd-4c8a74fa031d3356183e1562b7a9738d70e9f3ce.tar.gz
strsep() and daemon() needs _DEFAULT_SOURCE, replace bcopy()
bcopy() gone in POSIX 2008.
Diffstat (limited to 'gps2udp.c')
-rw-r--r--gps2udp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gps2udp.c b/gps2udp.c
index 83450798..b07eaa1f 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -12,6 +12,9 @@
*
*/
+/* strsep() and daemon() needs _DEFAULT_SOURCE */
+#define _DEFAULT_SOURCE
+
#include <time.h>
#include "gpsd_config.h"
@@ -165,7 +168,7 @@ static int open_udp(char **hostport)
return (-1);
}
- bcopy((char *)hp->h_addr, (char *)&remote[channel].sin_addr, hp->h_length);
+ memcpy( &remote[channel].sin_addr, hp->h_addr, hp->h_length);
remote[channel].sin_port = htons((in_port_t)portnum);
}
return (0);