mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Fix compilation in gcc
This commit is contained in:
parent
c804fb8d6f
commit
44ba718de4
@ -58,11 +58,9 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#define __USE_MISC
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
//#include <netinet/in.h>
|
|
||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netdb.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 (!(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';
|
strncpy(port, path, p-path); port[p-path] = '\0';
|
||||||
sscanf(p, ":%d:%d:%c:%d:%s", &brate, &bsize, &parity, &stopb, fctr);
|
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);
|
tracet(3, "consock: sock=%d\n", tcpcli->svr.sock);
|
||||||
|
|
||||||
/* wait re-connect */
|
/* 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))
|
(int)(tickget()-tcpcli->svr.tdis) < tcpcli->svr.tcon))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user