Re: Garnome-2.13.2 on Debian Sid



Olivier,

Looks like an include file issue that may be distro dependent. The
solution may be to just cast your way out of the problem and move on.

------------------------------------------------------------------------
Let's look at the code in question:

        [from gnet-2.0.7/src/tcp.c]
              ...
         gint error, len;
               ...
        
         /* Get the error option */
          if (getsockopt(state->socket->sockfd, SOL_SOCKET, SO_ERROR, (void*) &error, &len) < 0)


The include file glib-2.0/glib/gtype.h indicates that 

        typedef int    gint;
        
On my system [anFC2 clone for PPCs]

         int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);

So the problem comes down to 

	"what is the definition of socklen_t?"

On my system it is an integer, so all is well.  On your system I suspect
that it is an unsigned integer, which is the source of the problem.

Since I don't know of any "gsocket" types,  I would cast my way out of
the problem and move on.


-Joseph

=========================================================================================
On Sun, 2005-12-04 at 10:10 +0100, Olivier Lecarme wrote:
> A new problem now:
> 
> make
> [===== NOW BUILDING:	gnet-2.0.7	=====]

[snip]

> l/garnome/include/glib-2.0 -I/home/ol/garnome/lib/glib-2.0/include -pthread -I/home/ol/garnome/include/glib-2.0 -I/home/ol/garnome/lib/glib-2.0/include -I/home/ol/garnome/include -g -I/home/ol/garnome/include -L/home/ol/garnome/lib -O2 -pipe -D_REENTRANT -DGNET_EXPERIMENTAL -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror -MT tcp.lo -MD -MP -MF .deps/tcp.Tpo -c tcp.c  -fPIC -DPIC -o .libs/tcp.o
> cc1: warnings being treated as errors
> tcp.c: In function 'gnet_tcp_socket_new_async_cb':
> tcp.c:492: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness
> make[3]: *** [tcp.lo] Erreur 1
> make[3]: Leaving directory `/reserve/garnome-2.13.2/fifth-toe/gnet/work/main.d/gnet-2.0.7/src'
> make[2]: *** [all-recursive] Erreur 1
> make[2]: Leaving directory `/reserve/garnome-2.13.2/fifth-toe/gnet/work/main.d/gnet-2.0.7'
> make[1]: *** [all] Erreur 2
> make[1]: Leaving directory `/reserve/garnome-2.13.2/fifth-toe/gnet/work/main.d/gnet-2.0.7'
> make: *** [build-work/main.d/gnet-2.0.7/Makefile] Erreur 2
> zsh: exit 2     make
> 
> Of course I could remove -Werror, but I suppose it's here for something?
> 
> -- 
> 
> 
> 			Olivier Lecarme
> 
-- 
joseph_sacco [at] comcast [dot] net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]