mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Fix compilation in gcc
This commit is contained in:
parent
c804fb8d6f
commit
44ba718de4
@ -58,11 +58,9 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#define __USE_MISC
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <sys/socket.h>
|
||||
//#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user