From: Guido Günther Date: Wed, 1 May 2013 20:35:44 +0000 (+0200) Subject: virInitctlRequest: Don't hardcode 384 bytes size X-Git-Tag: v1.0.5~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcf97846d54b9ae20181f0f29c684b6ae4de89ee;p=thirdparty%2Flibvirt.git virInitctlRequest: Don't hardcode 384 bytes size When MAXHOSTNAMELEN is set we have to take it's value into account. Otherwise the build fails on kFreeBSD (FreeBSD kernel and GNU userland) --- diff --git a/src/util/virinitctl.c b/src/util/virinitctl.c index 1618ffa978..9a3e8a3551 100644 --- a/src/util/virinitctl.c +++ b/src/util/virinitctl.c @@ -103,7 +103,11 @@ struct virInitctlRequest { } i; }; -verify(sizeof(struct virInitctlRequest) == 384); +# ifdef MAXHOSTNAMELEN + verify(sizeof(struct virInitctlRequest) == 320 + MAXHOSTNAMELEN); +# else + verify(sizeof(struct virInitctlRequest) == 384); +#endif /* * Send a message to init to change the runlevel