This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/17679] Can't use htole*, htobe*, __bswap* functions in static/global context


https://sourceware.org/bugzilla/show_bug.cgi?id=17679

--- Comment #2 from Dan Streetman <ddstreet at ieee dot org> ---
FYI, I found this bug because the current linux kernel fails to build on BE
platforms because of the use of htole16() and htole32() in the setup of a
static variable in Documentation/mic/mpssd/mpssd.c; the failure is:

In file included from /usr/include/bits/byteswap.h:34:0,
                 from /usr/include/endian.h:60,
                 from /usr/include/bits/waitstatus.h:64,
                 from /usr/include/stdlib.h:42,
                 from /root/linux/Documentation/mic/mpssd/mpssd.c:23:
/root/linux/Documentation/mic/mpssd/mpssd.c:93:10: error: braced-group within
expression allowed only inside a function
   .num = htole16(MIC_VRING_ENTRIES),
          ^
/root/linux/Documentation/mic/mpssd/mpssd.c:119:3: error: initializer element
is not constant
   .host_features = htole32(
   ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]