Support GCC 8.x and support static compile

This commit is contained in:
Nick Peng
2019-06-16 17:17:48 +08:00
parent a09e63d333
commit 3ef325d75d
15 changed files with 124 additions and 64 deletions

View File

@@ -867,7 +867,7 @@ struct ping_host_struct *fast_ping_start(PING_TYPE type, const char *host, int c
}
memset(ping_host, 0, sizeof(*ping_host));
strncpy(ping_host->host, host, PING_MAX_HOSTLEN);
safe_strncpy(ping_host->host, host, PING_MAX_HOSTLEN);
ping_host->fd = -1;
ping_host->timeout = timeout;
ping_host->count = count;