X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibtirpc.git;a=blobdiff_plain;f=src%2Frpc_generic.c;h=a43906c0dc5f2be964364970f1fc4315e9d9668b;hp=509fb36d5ae5ffbdf5e48d0aaab4880be262f104;hb=1b2274af88fc30a25f43be91e177cea041958e48;hpb=05e779c3a20dce57d28e3303a7b318d118902d51 diff --git a/src/rpc_generic.c b/src/rpc_generic.c index 509fb36..a43906c 100644 --- a/src/rpc_generic.c +++ b/src/rpc_generic.c @@ -228,16 +228,16 @@ __rpc_getconfip(nettype) extern thread_key_t tcp_key, udp_key; extern mutex_t tsd_lock; - if (tcp_key == -1) { + if (tcp_key == KEY_INITIALIZER) { mutex_lock(&tsd_lock); - if (tcp_key == -1) + if (tcp_key == KEY_INITIALIZER) thr_keycreate(&tcp_key, free); mutex_unlock(&tsd_lock); } netid_tcp = (char *)thr_getspecific(tcp_key); - if (udp_key == -1) { + if (udp_key == KEY_INITIALIZER) { mutex_lock(&tsd_lock); - if (udp_key == -1) + if (udp_key == KEY_INITIALIZER) thr_keycreate(&udp_key, free); mutex_unlock(&tsd_lock); } @@ -535,7 +535,9 @@ __rpc_nconf2fd_flags(const struct netconfig *nconf, int flags) si.si_af == AF_INET6) { int val = 1; +#ifdef INET6 setsockopt(fd, SOL_IPV6, IPV6_V6ONLY, &val, sizeof(val)); +#endif } return fd; }