Mercurial > pidgin
changeset 2475:ba7ee4c1908c
[gaim-migrate @ 2488]
BMiller's fixes so gg compiles on solaris
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 10 Oct 2001 20:03:17 +0000 |
parents | 19b4cd08e458 |
children | ec21ec04cdeb |
files | src/protocols/gg/libgg.c src/protocols/gg/libgg.h |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/gg/libgg.c Wed Oct 10 19:58:11 2001 +0000 +++ b/src/protocols/gg/libgg.c Wed Oct 10 20:03:17 2001 +0000 @@ -1,4 +1,4 @@ -/* $Id: libgg.c 2412 2001-10-01 06:56:34Z warmenhoven $ */ +/* $Id: libgg.c 2488 2001-10-10 20:03:17Z warmenhoven $ */ /* * (C) Copyright 2001 Wojtek Kaniewski <wojtekka@irc.pl> @@ -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; }
--- a/src/protocols/gg/libgg.h Wed Oct 10 19:58:11 2001 +0000 +++ b/src/protocols/gg/libgg.h Wed Oct 10 20:03:17 2001 +0000 @@ -1,4 +1,4 @@ -/* $Id: libgg.h 2412 2001-10-01 06:56:34Z warmenhoven $ */ +/* $Id: libgg.h 2488 2001-10-10 20:03:17Z warmenhoven $ */ /* * (C) Copyright 2001 Wojtek Kaniewski <wojtekka@irc.pl> @@ -26,6 +26,10 @@ #define GG_DEBUG 1 +#ifndef INADDR_NONE +#define INADDR_NONE 0xffffffff +#endif + /* * typ zmiennej określającej numerek danej osoby. */