summaryrefslogtreecommitdiff
path: root/gpspipe.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-08-15 21:21:46 -0700
committerGary E. Miller <gem@rellim.com>2016-08-15 21:21:46 -0700
commit6692860642f8e359bc9da2603fea9fc7062884fc (patch)
treeca45922a30ec3a0e2f2428ba3df9925b32332111 /gpspipe.c
parent8f8f6ed4bd33f476df217dc24b08bfa5849450de (diff)
downloadgpsd-6692860642f8e359bc9da2603fea9fc7062884fc.tar.gz
bzero() is gone in POSIX 2008. Use memset()
Also two #defines for gpspipe.c
Diffstat (limited to 'gpspipe.c')
-rw-r--r--gpspipe.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gpspipe.c b/gpspipe.c
index 33d015c2..6e133f48 100644
--- a/gpspipe.c
+++ b/gpspipe.c
@@ -23,6 +23,12 @@
*
*/
+/* cfmakeraw() needs _DEFAULT_SOURCE */
+#define _DEFAULT_SOURCE
+/* daemon() needs _DEFAULT_SOURCE */
+#define _DEFAULT_SOURCE
+
+
#include <time.h> /* for time_t */
#include "gpsd_config.h"
@@ -77,7 +83,7 @@ static void open_serial(char *device)
}
/* Clear struct for new port settings. */
- bzero(&newtio, sizeof(newtio));
+ memset(&newtio, 0, sizeof(newtio));
/* make it raw */
(void)cfmakeraw(&newtio);