From: Daniel P. Berrange Date: Fri, 28 Jun 2013 14:17:41 +0000 (+0100) Subject: Conditionalize use of IF_MAXUNIT in virnetdevtap.c X-Git-Tag: CVE-2013-2218~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=002c8af9f0c2e30421c79680588b28802b012d0a;p=thirdparty%2Flibvirt.git Conditionalize use of IF_MAXUNIT in virnetdevtap.c The IF_MAXUNIT macro is not present on all BSDs, so make its use conditional, to avoid breaking OS-X. Signed-off-by: Daniel P. Berrange --- diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 265676cd4f..4e2f32a956 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -275,7 +275,7 @@ cleanup: VIR_FORCE_CLOSE(fd); return ret; } -#elif defined(SIOCIFCREATE2) && defined(SIOCIFDESTROY) +#elif defined(SIOCIFCREATE2) && defined(SIOCIFDESTROY) && defined(IF_MAXUNIT) int virNetDevTapCreate(char **ifname, int *tapfd, int tapfdSize,