From 44ba718de470f888348bf6b20bc488ab718ee0b6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 12 May 2017 19:40:51 +0200 Subject: [PATCH] Fix compilation in gcc --- src/algorithms/libs/rtklib/rtklib_stream.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/algorithms/libs/rtklib/rtklib_stream.cc b/src/algorithms/libs/rtklib/rtklib_stream.cc index bdeca40f2..7ce8b7a17 100644 --- a/src/algorithms/libs/rtklib/rtklib_stream.cc +++ b/src/algorithms/libs/rtklib/rtklib_stream.cc @@ -58,11 +58,9 @@ #include #include #include -#define __USE_MISC #include #include #include -//#include #include #include #include @@ -101,7 +99,7 @@ serial_t *openserial(const char *path, int mode, char *msg) if (!(serial = (serial_t *)malloc(sizeof(serial_t)))) return NULL; - if ((p = strchr(path, ':'))) + if ((p = strchr((char*)path, ':'))) { strncpy(port, path, p-path); port[p-path] = '\0'; sscanf(p, ":%d:%d:%c:%d:%s", &brate, &bsize, &parity, &stopb, fctr); @@ -953,7 +951,7 @@ int consock(tcpcli_t *tcpcli, char *msg) tracet(3, "consock: sock=%d\n", tcpcli->svr.sock); /* wait re-connect */ - if (tcpcli->svr.tcon < 0 || (tcpcli->svr.tcon>0 && + if (tcpcli->svr.tcon < 0 || (tcpcli->svr.tcon > 0 && (int)(tickget()-tcpcli->svr.tdis) < tcpcli->svr.tcon)) { return 0;