include/bits/socket.h
Tobias Poschwatta
tp at fonz.de
Tue Dec 2 16:04:05 UTC 2008
Hi,
I think there's a problem with include/bits/socket.h when compiling
with g++. My test program is trivial:
#include <sys/socket.h>
int main(int argc, char **argv) { return 0; }
It compiles fine with gcc, but doesn't with g++:
# g++ -Wall -o s socket.c
.../include/bits/socket.h:271: error: expected initializer before 'throw'
Preprocessor output (g++ -E) shows the problem:
extern struct cmsghdr * __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *_
_cmsg) throw () throw ();
The orginal socket.h contains:
extern struct cmsghdr * __NTH (__cmsg_nxthdr (struct msghdr *__mhdr,
struct cmsghdr *__cmsg)) __THROW;
It seems that for g++, both __NTH and __THROW add a 'throw ()' to the
declaration.
This was tested with 0.9.30 on mipsel.
T.
More information about the uClibc
mailing list