summaryrefslogtreecommitdiff
path: root/gps2udp.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2015-04-28 18:07:54 -0700
committerGary E. Miller <gem@rellim.com>2015-04-28 18:09:29 -0700
commit838d9fefa4bef2469cf2c6e8ec908e949215d8ee (patch)
tree31959f15be5eb75e83585c0d86ce566fd4040cf0 /gps2udp.c
parent8559faf6866ec954fde105c32e4b07cb69bba64b (diff)
downloadgpsd-838d9fefa4bef2469cf2c6e8ec908e949215d8ee.tar.gz
Revert "Copy structs using assignment, not memcpy()."
This reverts commit d1965788249d7e22cdde4021d452cf0dc6c6b9bd. This breaks my build on Gentoo running gcc 4.9.2 libgps_shm.c: In function 'int gps_shm_read(gps_data_t*)': libgps_shm.c:122:12: error: no match for 'operator=' (operand types are 'gps_data_t' and 'volatile gps_data_t') noclobber = shared->gpsdata; ^ libgps_shm.c:122:12: note: candidate is: In file included from gpsd.h:350:0, from libgps_shm.c:30: gps.h:1918:8: note: gps_data_t& gps_data_t::operator=(const gps_data_t&) struct gps_data_t { ^ gps.h:1918:8: note: no known conversion for argument 1 from 'volatile gps_data_t' to 'const gps_data_t&'
Diffstat (limited to 'gps2udp.c')
-rw-r--r--gps2udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gps2udp.c b/gps2udp.c
index e4f0ed4f..2bcb232d 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -240,7 +240,7 @@ static ssize_t read_gpsd(char *message, size_t len)
/* prepare for a blocking read with a 10s timeout */
tv.tv_sec = 10;
tv.tv_usec = 0;
- fds = master;
+ memcpy(&fds, &master, sizeof(fd_set));
result = select(gpsdata.gps_fd+1, &fds, NULL, NULL, &tv);
switch (result)