Skip to content
Snippets Groups Projects
Commit 0e7e2d62 authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

fixed typo in the MAC specific code

parent ec892663
Branches
Tags
No related merge requests found
......@@ -714,18 +714,19 @@ static void dlf_openlog() {
if (connect(LogFile, (struct sockaddr *)&SyslogAddr, sizeof(SyslogAddr)) == -1) {
(void)close(LogFile);
LogFile = -1;
} else
} else {
#ifdef __APPLE__
// MAC has has no MSG_NOSIGNAL
// but >= 10.2 comes with SO_NOSIGPIPE
int set = 1;
if (0 != setsockopt(LogFile, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof(int))) {
(void)close(LogFile);
LogFile = -1;
return;
}
if (0 != setsockopt(LogFile, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof(int))) {
(void)close(LogFile);
LogFile = -1;
return;
}
#endif
connected = 1;
connected = 1;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment