I have a program that performs some network IO that compiles a 32 bit binary just fine
However, when I set the -m64 option at compile time I get the following rather cryptic error
In file included from /usr/include/sys/stream.h:22,
from /usr/include/netinet/in.h:62,
from /usr/include/sys/socket.h:221,
from operation_networkio.cc:15:
/usr/include/sys/vnode.h:241: error: overflow in array dimension
/usr/include/sys/vnode.h:241: error: size of array `pad' is too large
the offending lines in my source code operation_networkio.cc that are triggering this error in my program seem to be
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
could someone enlighten me what I am doing wrong and how to cure this ?
I’m using GCC on Solaris sparc
eventually found that I had -mfaster-structs option enabled on the compilation.
For some reason removing this option cures this build problem. that causes a 64 bit build to fail, though a 32 bit build works.
If someone could explain it I’d certainly like to know why