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 <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-06-28 15:17:41 +01:00
parent 1a3eaa80a4
commit 002c8af9f0

View 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,