1. Compile problems with netinet/in.h
Ain't porting fun?
Every Unix vendor has their include files set up in different,
intricate, typically incompatible, ways. On Solaris 2.6, trying to
compile (with CC) a file which includes <netinet/in.h> gives the
following errors (this is just the first few lines):
"/usr/include/sys/resource.h", line 115: Error: The type "timeval" is
incomplete.
"/usr/include/sys/resource.h", line 116: Error: The type "timeval" is
incomplete.
"/usr/include/sys/vnode.h", line 87: Error: Type name expected instead
of "u_short".
"/usr/include/sys/vnode.h", line 87: Error: No storage class or type for
this declaration.
"/usr/include/sys/vnode.h", line 87: Error: "," expected instead of
"v_flag".
[and so on]
Ok, so I found that to get struct timeval defined I evidently need to
define _XPG4_2. Dandy. Having done that I now see that the BSD socket
funcs get renamed to xnet_something an I'll need to link with -lxnet.
Fine with me. Compiling with _XPG4_2, though, gives this:
Error: The function __xnet_socket must have a prototype.
This thing ain't playing fair. I'd appreciate any advice and/or pointers
to docs or web resources that would help me clarify just which elephants
I need to balance on which bowling balls to get a clean compile. That
is, I'm trying to find the magic combination of things to define, files
to include (in what order), etc to get past this roadblock. Many thanks.
--
Guy Finney
2. pl. help: K7V audio problem
3. Compiling dosemu: "...not file netinet/if.h"
4. battery power supply for linuxppc
5. Q: problems compiling when including netinet/ip.h
6. Way Cool.
7. Satan compile bugs, netinet/*.h incompatible?
8. Mac server security
9. Can't compile with netinet/in.h on Solaris 2.6
10. where to find /usr/include/bsd/netinet/ip_var.h & ip.h
11. netinet include files
12. need netinet/*.h header files.
13. netinet/ip_tcp.h getting clobbered