[systemd-devel] build broken on clang

Lennart Poettering lennart at poettering.net
Mon Dec 2 08:17:50 PST 2013


On Sun, 01.12.13 00:38, Thomas H.P. Andersen (phomes at gmail.com) wrote:

> Hi,
> 
> Since 777d7a6123cbb192a8ff9e4ac5c05b1da84b4217 the build is broken on clang:
> 
> src/libsystemd-bus/bus-control.c:686:41: error: fields must have a
> constant size: 'variable length array in structure' extension will
> never be supported
>                                 uint8_t buffer[sz];
>                                         ^
> src/libsystemd-bus/bus-control.c:748:33: error: fields must have a
> constant size: 'variable length array in structure' extension will
> never be supported
>                         uint8_t buffer[sz];

Hmm, this isn't even a struct, it's a union...

Anyway, I changed this now, given that we can use alloca0() here, and
the resulting code is actually nicer than before...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list