diff options
author | Gary E. Miller <gem@rellim.com> | 2016-08-15 21:25:59 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-08-15 21:25:59 -0700 |
commit | 4c8a74fa031d3356183e1562b7a9738d70e9f3ce (patch) | |
tree | 5eda27c4923d5c84b244fcdd41c5a8e2bd08fa61 /gps2udp.c | |
parent | 0260b7d8004e4c16928ef8d8e1bf6f6c9de8e0c8 (diff) | |
download | gpsd-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |