- (dtucker] [misc.c] Shrink the area covered by USE_ROUTINGDOMAIN more

to eliminate an unused variable warning.
This commit is contained in:
Darren Tucker 2010-01-08 20:09:01 +11:00
parent e83c3ea4b8
commit cb5a1b6f70
3 changed files with 6 additions and 4 deletions

View File

@ -165,6 +165,8 @@
too.
- (dtucker) [misc.c] Move the routingdomain ifdef to allow the socket to
be created.
- (dtucker] [misc.c] Shrink the area covered by USE_ROUTINGDOMAIN more
to eliminate an unused variable warning.
20091226
- (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1

6
misc.c
View File

@ -163,12 +163,12 @@ socket_rdomain(int domain, int type, int protocol, int rdomain)
if (rdomain == -1)
return (sock);
#ifdef USE_ROUTINGDOMAIN
switch (domain) {
case AF_INET6:
ipproto = IPPROTO_IPV6;
/* FALLTHROUGH */
case AF_INET:
#ifdef USE_ROUTINGDOMAIN
debug2("socket %d af %d setting rdomain %d",
sock, domain, rdomain);
if (setsockopt(sock, ipproto, SO_RDOMAIN, &rdomain,
@ -178,6 +178,7 @@ socket_rdomain(int domain, int type, int protocol, int rdomain)
close(sock);
return (-1);
}
#endif
break;
default:
debug("socket %d af %d does not support rdomain %d",
@ -187,9 +188,6 @@ socket_rdomain(int domain, int type, int protocol, int rdomain)
}
return (sock);
#else
return (-1);
#endif
}
/* Characters considered whitespace in strsep calls. */

View File

@ -15,6 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "includes.h"
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/socket.h>