<div dir="ltr">On Tue, Aug 5, 2014 at 9:11 PM, Greg KH <span dir="ltr"><<a href="mailto:greg@kroah.com" target="_blank">greg@kroah.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On Tue, Aug 05, 2014 at 07:58:47PM -0500, Dan McGee wrote:<br>
> Compilation is failing because we are doing something not allowed by the<br>
> language spec, but OK by GCC extensions in our MAX() macro.<br>
><br>
> src/resolve/resolved-manager.c:759:43: error: non-const static data member must be initialized out of line<br>
> uint8_t buffer[CMSG_SPACE(MAX(sizeof(struct in_pktinfo), sizeof(struct in6_pktinfo)))<br>
> ^<br>
><br>
> Add a new constant that does this in a way both compilers are OK with,<br>
> since we know all factors in the size computation are static.<br>
<br>
</div>Why not just fix MAX()?<br>
<br></blockquote><div>Mainly because 1) I'm not a preprocessor expert, and 2) this code is the only broken usage of MAX() and it was recently introduced.<br><br></div><div>I'm all for someone fixing this the "right" way if this is deemed incorrect, but right now one can't even compile on what most would consider a non-experimental C toolchain, and this was the quickest and easiest fix I could come up with.<br>
</div><div><br></div><div>-Dan<br></div></div><br></div></div>