In article <[email protected]>, Joerg Sonnenberger <[email protected]> wrote: >On Mon, May 30, 2011 at 06:10:36PM +0000, Christos Zoulas wrote: >> In article <[email protected]>, >> Joerg Sonnenberger <[email protected]> wrote: >> >-=-=-=-=-=- >> > >> >> >+#ifdef __clang__ >> >+ char buf[128]; >> >+#else >> > char buf[CMSG_SPACE(sizeof(int))]; >> >+#endif >> > } cmsgbuf; >> >> Wouldn't it be better insted to re-define CMSG_SPACE for clang like: >> #ifdef __clang__ >> #define CMSG_SPACE(x) ((x) + 128) >> #else >> ... >> #endif > >No. The real fix would be to teach the kernel compat32 handling for cmsg >and make it a proper constant again. 128 is simply large enough for all >platforms we have.
Yes, but now you are polluting the code with ifdefs everywhere that will need to be undone. christos
