Re: [Plib-users] need help compiling plib
Brought to you by:
sjbaker
|
From: Sebastian U. <ud...@ha...> - 2002-04-21 17:38:19
|
On Sun, 21 Apr 2002, ma...@ne... (Mathew Kohel) wrote: > Date: Sun, 21 Apr 2002 12:22:14 -0500 > To: <pli...@li...> > From: ma...@ne... (Mathew Kohel) > Subject: [Plib-users] need help compiling plib > > Hello all, > > I download the most recent stable version of plib and tried to compiled > it win mandrake 8.1. > > I received the following error: > > make[2]: Entering directory `/usr/src/plib-1.4.2/src/net' > c++ -DPACKAGE=\"plib\" -DVERSION=\"1.4.2\" -DHAVE_LIBDL=1 -DHAVE_LIBGL=1 > -DH > AVE_LIBGLU=1 -DHAVE_LIBGLUT=1 -DHAVE_GL_GL_H=1 -DHAVE_GL_GLU_H=1 > -DLINUX_JOY > STICK_IS_PRESENT=1 -DGLUT_IS_PRESENT=1 -I. -I. -I../../src/util > -I/usr/lo > cal/include > -g -O2 -O6 -Wall -c netSocket.cxx > netSocket.cxx: In method `int netSocket::accept (netAddress *)': > netSocket.cxx:218: cannot convert `int *' to `socklen_t *' for argument > `3' to `accept (int, sockaddr *, socklen_t *)' > netSocket.cxx: In method `int netSocket::recvfrom (void *, int, int, > netAddress *)': > netSocket.cxx:256: cannot convert `int *' to `socklen_t *' for argument > `6' to `recvfrom (int, void *, unsigned int, int, sockaddr *, socklen_t > *)' [...] > Where shoud soklen_t be defined? I assuming I just need to include an > another .h file, just am not sure which one. The source file should include "sys/types.h", but it doesn't. (To the original author: typedef'ing "socklen_t" to be "int" is not a solution. Passing a pointer to your home-made type to a library function is dangerous, since nobody gurantees that the "socklen_t" of the C library and your definition have the same size. "man recv" explicitly says that both "sys/socket.h" and "sys/types.h must be included. I guess including "sys/types.h" will fix the problem for you. Please try it and report if it did so that we can fix this bug in CVS. - Sebastian |