pa_fd_set_cloexec(fd, 1);
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void*)&on, sizeof(on)) < 0)
pa_log(__FILE__": setsockopt(): %s\n", strerror(errno));
pa_socket_tcp_low_delay(fd);
pa_fd_set_cloexec(fd, 1);
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void*)&on, sizeof(on)) < 0)
pa_log(__FILE__": setsockopt(): %s\n", strerror(errno));
pa_socket_tcp_low_delay(fd);
#ifdef SO_PRIORITY
priority = 7;
- if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &priority, sizeof(priority)) < 0)
+ if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, (void*)&priority, sizeof(priority)) < 0)
return -1;
#endif
#if defined(SOL_TCP) || defined(IPPROTO_TCP)
#if defined(SOL_TCP)
- if (setsockopt(fd, SOL_TCP, TCP_NODELAY, &on, sizeof(on)) < 0)
+ if (setsockopt(fd, SOL_TCP, TCP_NODELAY, (void*)&on, sizeof(on)) < 0)
#else
- if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) < 0)
+ if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (void*)&on, sizeof(on)) < 0)
#endif
ret = -1;
#endif
defined(IPPROTO_IP))
tos = IPTOS_LOWDELAY;
#ifdef SOL_IP
- if (setsockopt(fd, SOL_IP, IP_TOS, &tos, sizeof(tos)) < 0)
+ if (setsockopt(fd, SOL_IP, IP_TOS, (void*)&tos, sizeof(tos)) < 0)
#else
- if (setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)) < 0)
+ if (setsockopt(fd, IPPROTO_IP, IP_TOS, (void*)&tos, sizeof(tos)) < 0)
#endif
ret = -1;
#endif
int pa_socket_set_rcvbuf(int fd, size_t l) {
assert(fd >= 0);
-/* if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &l, sizeof(l)) < 0) { */
+/* if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void*)&l, sizeof(l)) < 0) { */
/* pa_log(__FILE__": SO_RCVBUF: %s\n", strerror(errno)); */
/* return -1; */
/* } */
int pa_socket_set_sndbuf(int fd, size_t l) {
assert(fd >= 0);
-/* if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &l, sizeof(l)) < 0) { */
+/* if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (void*)&l, sizeof(l)) < 0) { */
/* pa_log(__FILE__": SO_SNDBUF: %s\n", strerror(errno)); */
/* return -1; */
/* } */