[ale] C++, sockets, 2.2.12
Joe Knapka
jknapka at charter.net
Wed Sep 22 16:45:16 EDT 1999
Hello, all,
[Techie coding problem alert - hit delete if you're allergic]
I've got some C++ code that uses sockets. It compiled fine under
2.2.12, until today when I upgraded to GCC-2.95.1. Now I get
an error in /usr/include/linux/socket.h (included by sys/socket.h)
because an internal kernel function defined inline in the header
is violating an ANSI C++ restriction on casting of return
values (it's trying to return a void* from a function defined
to return a struct cmsghdr*). This happens regardless of whether
I #include these things inside of extern "C" {}.
Anybody know the answer to this offhand? This is clearly not
a GCC problem, but it's triggered by GCC's better ANSI
compliance. It could be considered a kernel bug. Or maybe it's
something that would be fixed by an upgrade to GNU libc (I'm
currently using 2.0.7), but I don't think that the socket API is
part of Glibc. Any advice is appreciated.
Also, I kind of remember someone saying here that very recent
versions of GCC will not compile the kernel correctly. Am
I remembering that correctly? If so, what's a good version
to use?
TIA,
-- Joe
* Joe Knapka
* I speak only for myself, not for these idiots:
* The Software Monastery - "Better Software Through Divine
* Intervention." Source-code prayer vigils available - nominal
* donation $0.01/LOC. http://whyme.penguinpowered.com/monastery.html
More information about the Ale
mailing list