]> xenbits.xensource.com Git - people/dariof/libvirt.git/commitdiff
Conditionalize use of IF_MAXUNIT in virnetdevtap.c
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 28 Jun 2013 14:17:41 +0000 (15:17 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 28 Jun 2013 14:17:41 +0000 (15:17 +0100)
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 <berrange@redhat.com>
src/util/virnetdevtap.c

index 265676cd4faeac446664cc2ab5fb23a3c37ff332..4e2f32a9565951bbed3f231bfa9b9476b0c20aab 100644 (file)
@@ -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,