Fixes to compile on solaris 9 using g++.

This commit is contained in:
crs
2004-05-01 10:12:06 +00:00
parent dcfe49ef48
commit 165c889c5d
4 changed files with 19 additions and 6 deletions

View File

@@ -34,6 +34,9 @@
#if HAVE_POLL
# include <sys/poll.h>
# if HAVE_ALLOCA_H
# include <alloca.h>
# endif
#else
# if HAVE_SYS_SELECT_H
# include <sys/select.h>
@@ -43,6 +46,13 @@
# endif
#endif
#if HAVE_ALLOCA_H
# define freea(x_)
#else
# define alloca(x_) malloc(x_)
# define freea(x_) free(x_)
#endif
static const int s_family[] = {
PF_UNSPEC,
PF_INET
@@ -327,8 +337,10 @@ CArchNetworkBSD::pollSocket(CPollEntry pe[], int num, double timeout)
if (errno == EINTR) {
// interrupted system call
ARCH->testCancelThread();
freea(pfd);
return 0;
}
freea(pfd);
throwError(errno);
}
@@ -349,6 +361,7 @@ CArchNetworkBSD::pollSocket(CPollEntry pe[], int num, double timeout)
}
}
freea(pfd);
return n;
}