From 627c70a7d93d8430e9cf7801cf95470d2b21753e Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Thu, 25 Nov 2010 19:33:23 +0000 Subject: [PATCH] Add check for SO_RTABLE support in openbsd, #95 --- src/util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 30b7197..2515dd2 100644 --- a/src/util.c +++ b/src/util.c @@ -71,7 +71,11 @@ get_resolvconf_addr() void socket_setrtable(int fd, int rtable) { +#ifdef SO_RTABLE if (setsockopt (fd, IPPROTO_IP, SO_RTABLE, &rtable, sizeof(rtable)) == -1) - err(1, "Failed to set routing table %d", rtable); + err(1, "Failed to set routing table %d", rtable); +#else + fprintf(stderr, "Routing domain support was not available at compile time.\n"); +#endif } #endif