iochannel: don't use variable length array in union
authorTanu Kaskinen <tanuk@iki.fi>
Sat, 4 Feb 2017 12:19:01 +0000 (14:19 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Tue, 7 Mar 2017 13:17:27 +0000 (15:17 +0200)
commit18ec0fe53ef3d296c8878efce768684b73e3fc8a
tree3389b8ac408c7225139e881e21e7fe6568eeceec
parent0cb72beaceca1e8e8e3eb330cbaa516912fa6dbd
iochannel: don't use variable length array in union

Clang didn't like the variable length array:

pulsecore/iochannel.c:358:17: error: fields must have a constant size:
'variable length array in structure' extension will never be supported
        uint8_t data[CMSG_SPACE(sizeof(int) * nfd)];
                ^

Commit 451d1d6762 introduced the variable length array in order to have
the correct value in msg_controllen. This patch reverts that commit and
uses a different way to achieve the same goal.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=99458
src/pulsecore/iochannel.c