From: Eric W. <war...@us...> - 2001-10-10 20:03:19
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv6959/src/protocols/gg Modified Files: libgg.c libgg.h Log Message: BMiller's fixes so gg compiles on solaris Index: libgg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/libgg.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- libgg.c 2001/10/01 06:56:34 1.2 +++ libgg.c 2001/10/10 20:03:17 1.3 @@ -26,6 +26,8 @@ #include <arpa/inet.h> #include <sys/ioctl.h> #include <sys/wait.h> +#include <sys/types.h> +#include <fcntl.h> #include <netdb.h> #include <errno.h> #include <string.h> @@ -210,7 +212,13 @@ } if (async) { +#ifdef FIONBIO if (ioctl(sock, FIONBIO, &one) == -1) { +#else + int flags = fcntl (sock, F_GETFL); + if (flags < 0 || + fcntl (sock, F_SETFL, flags | O_NONBLOCK) < 0) { +#endif gg_debug(GG_DEBUG_MISC, "-- ioctl() failed. errno = %d (%s)\n", errno, strerror(errno)); return -1; } Index: libgg.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/libgg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- libgg.h 2001/10/01 06:56:34 1.2 +++ libgg.h 2001/10/10 20:03:17 1.3 @@ -26,6 +26,10 @@ #define GG_DEBUG 1 +#ifndef INADDR_NONE +#define INADDR_NONE 0xffffffff +#endif + /* * typ zmiennej okre¶laj±cej numerek danej osoby. */ |