diff --git a/daemon/call.c b/daemon/call.c index 1e85bb5ec..77195b150 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -594,7 +594,11 @@ static int get_port6(struct streamrelay *r, u_int16_t p) { nonblock(fd); reuseaddr(fd); +#ifdef IPV6_TCLASS setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, &r->up->up->call->callmaster->tos, sizeof(r->up->up->call->callmaster->tos)); +#else +#warning "Will not set IPv6 traffic class" +#endif ipv6only(fd, 0); ZERO(sin); diff --git a/daemon/control_udp.c b/daemon/control_udp.c index 891aa64ce..a9686da6e 100644 --- a/daemon/control_udp.c +++ b/daemon/control_udp.c @@ -96,9 +96,15 @@ static void control_udp_incoming(int fd, void *p) { if (u->poller->now - u->oven_time >= 30) { g_hash_table_remove_all(u->stale_cookies); +#if GLIB_CHECK_VERSION(2,14,0) g_string_chunk_clear(u->stale_chunks); - swap_ptrs(&u->stale_cookies, &u->fresh_cookies); swap_ptrs(&u->stale_chunks, &u->fresh_chunks); +#else + g_string_chunk_free(u->stale_chunks); + u->stale_chunks = u->fresh_chunks; + u->fresh_chunks = g_string_chunk_new(4 * 1024); +#endif + swap_ptrs(&u->stale_cookies, &u->fresh_cookies); u->oven_time = u->poller->now; /* baked new cookies! */ }