Commit 194b6a25 authored by Michael Graff's avatar Michael Graff

make sendmsg() and recvmsg() work on solaris and hpux through nasty methods

parent 2dcb05b6
...@@ -33,5 +33,13 @@ ...@@ -33,5 +33,13 @@
/* define if catgets() is available */ /* define if catgets() is available */
#undef HAVE_CATGETS #undef HAVE_CATGETS
/* Define if you have the NET_RT_IFLIST sysctl variable. */ /* define if you have the NET_RT_IFLIST sysctl variable. */
#undef HAVE_IFLIST_SYSCTL #undef HAVE_IFLIST_SYSCTL
/* define if you need to #define _XPG4_2 before including sys/socket.h */
#undef NEED_XPG4_2_BEFORE_SOCKET_H
/* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
* sys/socket.h
*/
#undef NEED_XSE_BEFORE_SOCKET_H
...@@ -33,9 +33,17 @@ ...@@ -33,9 +33,17 @@
/* define if catgets() is available */ /* define if catgets() is available */
#undef HAVE_CATGETS #undef HAVE_CATGETS
/* Define if you have the NET_RT_IFLIST sysctl variable. */ /* define if you have the NET_RT_IFLIST sysctl variable. */
#undef HAVE_IFLIST_SYSCTL #undef HAVE_IFLIST_SYSCTL
/* define if you need to #define _XPG4_2 before including sys/socket.h */
#undef NEED_XPG4_2_BEFORE_SOCKET_H
/* define if you need to #define _XOPEN_SOURCE_ENTENDED before including
* sys/socket.h
*/
#undef NEED_XSE_BEFORE_SOCKET_H
/* Define if you have the <fcntl.h> header file. */ /* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
......
#! /bin/sh #! /bin/sh
# From configure.in Revision: 1.49 # From configure.in Revision: 1.50
...@@ -2056,8 +2056,20 @@ fi ...@@ -2056,8 +2056,20 @@ fi
case "$host" in case "$host" in
*-dec-osf*) *-dec-osf*)
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define _SOCKADDR_LEN 1 #define _SOCKADDR_LEN 1
EOF
;;
*-sun-solaris*)
cat >> confdefs.h <<\EOF
#define NEED_XPG4_2_BEFORE_SOCKET_H 1
EOF
;;
*-hp-hpux*)
cat >> confdefs.h <<\EOF
#define NEED_XSE_BEFORE_SOCKET_H 1
EOF EOF
;; ;;
...@@ -2065,9 +2077,9 @@ esac ...@@ -2065,9 +2077,9 @@ esac
echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6
echo "configure:2069: checking for sa_len in struct sockaddr" >&5 echo "configure:2081: checking for sa_len in struct sockaddr" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2071 "configure" #line 2083 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
...@@ -2076,7 +2088,7 @@ int main() { ...@@ -2076,7 +2088,7 @@ int main() {
struct sockaddr sa; sa.sa_len = 0; return (0); struct sockaddr sa; sa.sa_len = 0; return (0);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
ISC_NET_HAVESALEN="#define ISC_NET_HAVESALEN 1" ISC_NET_HAVESALEN="#define ISC_NET_HAVESALEN 1"
...@@ -2092,9 +2104,9 @@ rm -f conftest* ...@@ -2092,9 +2104,9 @@ rm -f conftest*
echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6 echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6
echo "configure:2096: checking for interface list sysctl" >&5 echo "configure:2108: checking for interface list sysctl" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2098 "configure" #line 2110 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/param.h> #include <sys/param.h>
...@@ -2201,7 +2213,7 @@ else ...@@ -2201,7 +2213,7 @@ else
fi fi
echo $ac_n "checking build system type""... $ac_c" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:2205: checking build system type" >&5 echo "configure:2217: checking build system type" >&5
build_alias=$build build_alias=$build
case "$build_alias" in case "$build_alias" in
...@@ -2230,7 +2242,7 @@ ac_prog=ld ...@@ -2230,7 +2242,7 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path. # Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
echo "configure:2234: checking for ld used by GCC" >&5 echo "configure:2246: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5` ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in case "$ac_prog" in
# Accept absolute paths. # Accept absolute paths.
...@@ -2254,10 +2266,10 @@ echo "configure:2234: checking for ld used by GCC" >&5 ...@@ -2254,10 +2266,10 @@ echo "configure:2234: checking for ld used by GCC" >&5
esac esac
elif test "$with_gnu_ld" = yes; then elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
echo "configure:2258: checking for GNU ld" >&5 echo "configure:2270: checking for GNU ld" >&5
else else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:2261: checking for non-GNU ld" >&5 echo "configure:2273: checking for non-GNU ld" >&5
fi fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2293,7 +2305,7 @@ fi ...@@ -2293,7 +2305,7 @@ fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
echo "configure:2297: checking if the linker ($LD) is GNU ld" >&5 echo "configure:2309: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2309,7 +2321,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 ...@@ -2309,7 +2321,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
echo "configure:2313: checking for BSD-compatible nm" >&5 echo "configure:2325: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2346,7 +2358,7 @@ echo "$ac_t""$NM" 1>&6 ...@@ -2346,7 +2358,7 @@ echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:2350: checking whether ln -s works" >&5 echo "configure:2362: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2390,8 +2402,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" ...@@ -2390,8 +2402,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
case "$host" in case "$host" in
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # Find out which ABI we are using.
echo '#line 2394 "configure"' > conftest.$ac_ext echo '#line 2406 "configure"' > conftest.$ac_ext
if { (eval echo configure:2395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in case "`/usr/bin/file conftest.o`" in
*32-bit*) *32-bit*)
LD="${LD-ld} -32" LD="${LD-ld} -32"
...@@ -2412,19 +2424,19 @@ case "$host" in ...@@ -2412,19 +2424,19 @@ case "$host" in
SAVE_CFLAGS="$CFLAGS" SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf" CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:2416: checking whether the C compiler needs -belf" >&5 echo "configure:2428: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2421 "configure" #line 2433 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
lt_cv_cc_needs_belf=yes lt_cv_cc_needs_belf=yes
else else
...@@ -2539,9 +2551,9 @@ esac ...@@ -2539,9 +2551,9 @@ esac
echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6
echo "configure:2543: checking for IPv6 structures" >&5 echo "configure:2555: checking for IPv6 structures" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2545 "configure" #line 2557 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
...@@ -2551,7 +2563,7 @@ int main() { ...@@ -2551,7 +2563,7 @@ int main() {
struct sockaddr_in6 sin6; return (0); struct sockaddr_in6 sin6; return (0);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
ISC_NET_HAVEIPV6="#define ISC_NET_HAVEIPV6 1" ISC_NET_HAVEIPV6="#define ISC_NET_HAVEIPV6 1"
...@@ -2574,12 +2586,12 @@ rm -f conftest* ...@@ -2574,12 +2586,12 @@ rm -f conftest*
echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
echo "configure:2578: checking for inet_ntop" >&5 echo "configure:2590: checking for inet_ntop" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_ntop'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_inet_ntop'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2583 "configure" #line 2595 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_ntop(); below. */ which can conflict with char inet_ntop(); below. */
...@@ -2602,7 +2614,7 @@ inet_ntop(); ...@@ -2602,7 +2614,7 @@ inet_ntop();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_inet_ntop=yes" eval "ac_cv_func_inet_ntop=yes"
else else
...@@ -2626,12 +2638,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O" ...@@ -2626,12 +2638,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
fi fi
echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
echo "configure:2630: checking for inet_pton" >&5 echo "configure:2642: checking for inet_pton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2635 "configure" #line 2647 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_pton(); below. */ which can conflict with char inet_pton(); below. */
...@@ -2654,7 +2666,7 @@ inet_pton(); ...@@ -2654,7 +2666,7 @@ inet_pton();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_inet_pton=yes" eval "ac_cv_func_inet_pton=yes"
else else
...@@ -2678,12 +2690,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O" ...@@ -2678,12 +2690,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
fi fi
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
echo "configure:2682: checking for inet_aton" >&5 echo "configure:2694: checking for inet_aton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2687 "configure" #line 2699 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_aton(); below. */ which can conflict with char inet_aton(); below. */
...@@ -2706,7 +2718,7 @@ inet_aton(); ...@@ -2706,7 +2718,7 @@ inet_aton();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_inet_aton=yes" eval "ac_cv_func_inet_aton=yes"
else else
......
...@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ...@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
dnl SOFTWARE. dnl SOFTWARE.
AC_REVISION($Revision: 1.50 $) AC_REVISION($Revision: 1.51 $)
AC_PREREQ(2.13) AC_PREREQ(2.13)
...@@ -239,10 +239,16 @@ dnl ...@@ -239,10 +239,16 @@ dnl
case "$host" in case "$host" in
*-dec-osf*) *-dec-osf*)
dnl Turn on 4.4BSD style sa_len support. dnl Turn on 4.4BSD style sa_len support.
dnl (Disabled for now because it is incompatible
dnl with the use of send() and recv()).
AC_DEFINE(_SOCKADDR_LEN) AC_DEFINE(_SOCKADDR_LEN)
;; ;;
*-sun-solaris*)
dnl Solaris has yet another trick to get 4.4BSD behavior
AC_DEFINE(NEED_XPG4_2_BEFORE_SOCKET_H)
;;
*-hp-hpux*)
dnl And HP has to be different, too.
AC_DEFINE(NEED_XSE_BEFORE_SOCKET_H)
;;
esac esac
dnl dnl
......
...@@ -19,6 +19,17 @@ ...@@ -19,6 +19,17 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/uio.h> #include <sys/uio.h>
#if defined(NEED_XPG4_2_BEFORE_SOCKET_H) && !defined(_XPG4_2)
#define _XPG4_2
#include <sys/socket.h>
#undef _XPG4_2
#elif defined(NEED_XSE_BEFORE_SOCKET_H) && !defined(_XOPEN_SOURCE_EXTENDED)
#define _XOPEN_SOURCE_EXTENDED
#include <sys/socket.h>
#define _XOPEN_SOURCE_EXTENDED
#else
#include <sys/socket.h>
#endif
#include <errno.h> #include <errno.h>
#include <stddef.h> #include <stddef.h>
...@@ -39,19 +50,10 @@ ...@@ -39,19 +50,10 @@
/* /*
* Some systems define the socket length argument as an int, some as size_t, * Some systems define the socket length argument as an int, some as size_t,
* some as socklen_t. This is here, so it can be easily changed if needed. * some as socklen_t. This is here so it can be easily changed if needed.
*/ */
#ifndef ISC_SOCKADDR_LEN_T #ifndef ISC_SOCKADDR_LEN_T
#define ISC_SOCKADDR_LEN_T int #define ISC_SOCKADDR_LEN_T unsigned int
#endif
/*
* As above, one system (solaris) wants the pointers passed into recv() and
* the other network functions to be char *. All the others seem to use
* void *. Cast everything to char * for now.
*/
#ifndef ISC_SOCKDATA_CAST
#define ISC_SOCKDATA_CAST(x) ((char *)(x))
#endif #endif
/* /*
...@@ -496,7 +498,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, ...@@ -496,7 +498,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
#ifdef SO_TIMESTAMP #ifdef SO_TIMESTAMP
if (type == isc_sockettype_udp if (type == isc_sockettype_udp
&& setsockopt(sock->fd, SOL_SOCKET, SO_TIMESTAMP, && setsockopt(sock->fd, SOL_SOCKET, SO_TIMESTAMP,
ISC_SOCKDATA_CAST(&on), sizeof on) < 0) { (void *)&on, sizeof on) < 0) {
UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d) failed", UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d) failed",
sock->fd); sock->fd);
/* Press on... */ /* Press on... */
...@@ -782,7 +784,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) ...@@ -782,7 +784,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev)
* again. * again.
*/ */
addrlen = sizeof dev->newsocket->address.type; addrlen = sizeof dev->newsocket->address.type;
fd = accept(sock->fd, &dev->newsocket->address.type.sa, &addrlen); fd = accept(sock->fd, &dev->newsocket->address.type.sa, (void *)&addrlen);
dev->newsocket->address.length = addrlen; dev->newsocket->address.length = addrlen;
if (fd < 0) { if (fd < 0) {
if (SOFT_ERROR(errno)) { if (SOFT_ERROR(errno)) {
...@@ -1303,7 +1305,7 @@ watcher(void *uap) ...@@ -1303,7 +1305,7 @@ watcher(void *uap)
* Process reads on internal, control fd. * Process reads on internal, control fd.
*/ */
if (FD_ISSET(ctlfd, &readfds)) { if (FD_ISSET(ctlfd, &readfds)) {
while (1) { for (;;) {
msg = select_readmsg(manager); msg = select_readmsg(manager);
XTRACE(TRACE_WATCHER, XTRACE(TRACE_WATCHER,
...@@ -1980,7 +1982,7 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr) ...@@ -1980,7 +1982,7 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr)
LOCK(&sock->lock); LOCK(&sock->lock);
if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR,
ISC_SOCKDATA_CAST(&on), sizeof on) < 0) { (void *)&on, sizeof on) < 0) {
UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d) failed", UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d) failed",
sock->fd); sock->fd);
/* Press on... */ /* Press on... */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment