Embedding an extension

K

Kilian Mon ouïe

Hi,

I'm using Ruby on the PSP ( a patch has been posted here ;). Now, I'd
like to add the socket support to my application. Since there already is
a socket extension, I shouldn't create mine, should I ?

The problem is that, on the PSP, I can't use shared object. So I thought
the best way was to compile the socket extension with mine, and to call
"InitSocket()" in my main function. So I tried to add the defines in my
Makefile manually :
CFLAGS +=-DHAVE_UNISTD_H -DHAVE_NETINET_TCP_H \
-DHAVE_SYS_SELECT_H -DHAVE_SYS_TYPES_H -DHAVE_SYS_TIME_H
-DHAVE_FCNTL_H \
-DHAVE_ARPA_INET_H -D_FILE_OFFSET_BITS=64 -DHAVE_SOCKADDR_STORAGE \
-DHAVE_SOCKET_H -DHAVE_SENDMSG -DHAVE_RECVMSG -DHAVE_ST_MSG_CONTROL \
-DHAVE_GETNAMEINFO -DHAVE_TYPE_SOCKLEN_T -DHAVE_SOCKET \
-DHAVE_GETHOSTNAME -DHAVE_GETHOSTBYNAME2 -DHAVE_FNCTL

However... well... it doesn't compile yet.
socket/socket.c:1446: erreur: storage size of ‘from’ isn’t known
socket/socket.c:1446: attention : unused variable ‘from’

same for each uses of "struct sockaddr_storage". Does anyone know what I
should change in my CFLAGS ( or even in socket.c ) ?

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,614
Members
45,290
Latest member
JennaNies

Latest Threads

Top