[systemd-devel] compile with clang broken

Lennart Poettering lennart at poettering.net
Fri Aug 15 04:22:34 PDT 2014

On Fri, 15.08.14 13:00, David Herrmann (dh.herrmann at gmail.com) wrote:

> > src/resolve/resolved-dns-stream.c:67:43: error: non-const static data
> > member must be initialized out of line
> >                 uint8_t buffer[CMSG_SPACE(MAX(sizeof(struct
> > in_pktinfo), sizeof(struct in6_pktinfo)))
> >                                           ^
> Ok, this can be fixed by adding "const" to the variables inside the ({
> }) else-clause. But we then end up with:
>   error: statement expression not allowed at file scope

I wonder if there's *any* way how to implement a double-evalutation-free
all-type MAX() on LLVM... That'd be quite a limitation in LLVM...


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list