[systemd-devel] compile with clang broken
Thomas H.P. Andersen
phomes at gmail.com
Fri Jul 18 07:02:28 PDT 2014
1716f6dcf54d4c181c2e2558e3d5414f54c8d9ca (resolved: add LLMNR support
for looking up names) broke the build on clang.
src/resolve/resolved-manager.c:553: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)))
Moving the MAX(...) to a separate line fixes that problem but another
error then happens:
src/resolve/resolved-manager.c:554:25: error: fields must have a
constant size: 'variable length array in structure' extension will
never be supported
uint8_t buffer[CMSG_SPACE(size)
We have encountered the same problem before and Lennart was able to
write the code in a different way. Would this be possible here too?
More information about the systemd-devel
mailing list