Check-in Number:
|
976 | |
Date: |
2001-Sep-13 14:19:45 (local)
2001-Sep-13 12:19:45 (UTC) |
User: | thl |
Branch: | |
Comment: |
portability fixes for solaris |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/l2/configure.ac 1.6 -> 1.7
--- configure.ac 2001/09/11 10:37:04 1.6
+++ configure.ac 2001/09/13 12:19:45 1.7
@@ -75,6 +75,13 @@
AC_PROG_CPP
AC_CHECK_DEBUGGING
AC_CONFIGURE_LIBTOOL
+
+AC_CHECK_LIB(nsl, gethostname)
+if test ".`echo $LIBS | grep nsl`" = . ;then
+ AC_CHECK_LIB(nsl, gethostbyname)
+fi
+AC_CHECK_LIB(socket, accept)
+
AC_CHECK_FUNCS(inet_aton inet_pton inet_ntoa inet_ntop snprintf vsnprintf)
AC_CHECK_EXTLIB([Dmalloc], dmalloc, dmalloc_debug, dmalloc.h, AC_DEFINE(WITH_DMALLOC))
|
|
ossp-pkg/l2/l2_ch_socket.c 1.25 -> 1.26
--- l2_ch_socket.c 2001/09/12 09:42:34 1.25
+++ l2_ch_socket.c 2001/09/13 12:19:45 1.26
@@ -222,8 +222,8 @@
if (pHostentry->h_addrtype == AF_INET6) {
IP6Sockaddr.sin6_family = AF_INET6;
IP6Sockaddr.sin6_port = htons(cfg->iPort);
- memcpy(&IP6Sockaddr.sin6_addr.__u6_addr, pHostentry->h_addr_list[0],\
- sizeof(IP6Sockaddr.sin6_addr.__u6_addr));
+ memcpy(&IP6Sockaddr.sin6_addr.s6_addr, pHostentry->h_addr_list[0],\
+ sizeof(IP6Sockaddr.sin6_addr.s6_addr));
}
else
return L2_ERR_USE; /* what?? we specify IPv6 when it is not? */
|
|
ossp-pkg/l2/l2_ut_level.c 1.2 -> 1.3
--- l2_ut_level.c 2001/09/06 14:37:53 1.2
+++ l2_ut_level.c 2001/09/13 12:19:45 1.3
@@ -99,6 +99,13 @@
return hv;
}
+static int myishexnumber(int c)
+{
+ if (isdigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
+ return 1;
+ return 0;
+}
+
l2_result_t l2_util_s2l(const char *string, size_t maxlen, int sep, unsigned int *levelmask)
{
const char *cpB;
@@ -127,7 +134,7 @@
}
}
if (!bFound) {
- if ((cpE > cpB+2) && strncasecmp(cpB, "0x", 2) == 0 && ishexnumber((int)(*(cpB+2)))) {
+ if ((cpE > cpB+2) && strncasecmp(cpB, "0x", 2) == 0 && myishexnumber((int)(*(cpB+2)))) {
*levelmask |= hexval(cpB+2, cpE);
}
else
|
|
ossp-pkg/l2/l2_ut_sa.c 1.6 -> 1.7
--- l2_ut_sa.c 2001/09/11 10:37:04 1.6
+++ l2_ut_sa.c 2001/09/13 12:19:45 1.7
@@ -295,13 +295,13 @@
/* fill in family */
sf = 0;
if (sizeof(struct sockaddr_in) == salen) {
- sa4 = (struct sockaddr_in *)sabuf;
+ sa4 = (struct sockaddr_in *)((void *)sabuf);
if (sa4->sin_family == AF_INET)
sf = AF_INET;
}
#ifdef AF_INET6
else if (sizeof(struct sockaddr_in6) == salen) {
- sa6 = (struct sockaddr_in6 *)sabuf;
+ sa6 = (struct sockaddr_in6 *)((void *)sabuf);
if (sa6->sin6_family == AF_INET6)
sf = AF_INET6;
}
@@ -332,13 +332,13 @@
if ((pe = getprotobynumber(saa->saa_proto)) == NULL)
return SA_ERR_SYS;
if (saa->saa_family == AF_INET) {
- sa4 = (struct sockaddr_in *)saa->saa_buf;
+ sa4 = (struct sockaddr_in *)((void *)saa->saa_buf);
inet_ntop(AF_INET, &sa4->sin_addr.s_addr, caHost, sizeof(caHost));
nPort = ntohs(sa4->sin_port);
}
#ifdef AF_INET6
else if (saa->saa_family == AF_INET6) {
- sa6 = (struct sockaddr_in6 *)saa->saa_buf;
+ sa6 = (struct sockaddr_in6 *)((void *)saa->saa_buf);
inet_ntop(AF_INET6, &sa6->sin6_addr.s6_addr, caHost, sizeof(caHost));
nPort = ntohs(sa6->sin6_port);
}
|
|