mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-29 12:41:03 +00:00
PF_INET -> AF_INET, unbreaks FreeBSD
This commit is contained in:
1 parent
1d1a05bf39
commit
d5004cb7eb
1 file changed
+2
-2
+2
-2
@@ -831,7 +831,7 @@ struct ns_connection *ns_connect(struct ns_server *server, const char *host,
|
||||
#endif
|
||||
|
||||
if (host == NULL || (he = gethostbyname(host)) == NULL ||
|
||||
(sock = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) {
|
||||
(sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) {
|
||||
DBG(("gethostbyname(%s) failed: %s", host, strerror(errno)));
|
||||
return NULL;
|
||||
}
|
||||
@@ -3754,7 +3754,7 @@ static sock_t conn2(const char *host, int port) {
|
||||
|
||||
if (host != NULL &&
|
||||
(he = gethostbyname(host)) != NULL &&
|
||||
(sock = socket(PF_INET, SOCK_STREAM, 0)) != INVALID_SOCKET) {
|
||||
(sock = socket(AF_INET, SOCK_STREAM, 0)) != INVALID_SOCKET) {
|
||||
set_close_on_exec(sock);
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_port = htons((uint16_t) port);
|
||||
|
||||
Reference in new issue
Block a user