Compile fixes in daemon for Debian etch

remotes/origin/2.0
Richard Fuchs 14 years ago
parent 3e792a689c
commit d3dca330fa

@ -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);

@ -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! */
}

Loading…
Cancel
Save