protocol-pulse: ifdef Linux-specific errnos and socket opts

This commit is contained in:
Greg V 2020-11-09 00:39:56 +03:00 committed by Wim Taymans
parent bd57c1a457
commit fba8cd9f56
2 changed files with 8 additions and 0 deletions

View file

@ -4264,9 +4264,11 @@ on_connect(void *data, int fd, uint32_t mask)
if (server->type == SERVER_TYPE_UNIX) {
val = 6;
#ifdef SO_PRIORITY
if (setsockopt(client_fd, SOL_SOCKET, SO_PRIORITY,
(const void *) &val, sizeof(val)) < 0)
pw_log_warn("SO_PRIORITY failed: %m");
#endif
} else if (server->type == SERVER_TYPE_INET) {
val = 1;
if (setsockopt(client_fd, IPPROTO_TCP, TCP_NODELAY,