I use Ubuntu 15.10 64 bit. gcc-5-multilib, g++-5-multilib, libc6-i386, kernel headers and all build toolchain are installed. When I try to compile 32 bit library (for linux) like:
gcc -m32 -fPIC -shared -Wl,-soname,mylib.so -o mylib.so mylib.c
I get an error:
/usr/include/bits/socket.h:345:24: fatal error: asm/socket.h: No such file or directory
What can I do to compile a code with #include <sys/socket.h>
on 64 bit for 32 bit linux?