mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 14:05:33 +00:00
rename HAVE_SIN_LEN macro to HAVE_SA_LEN, and use it for setting sun_len in the custom domain socket handler in lib/cc/session.cc
(removing the custom code altogether in favour of asio is under consideration) git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac183@2008 e5f2f494-b856-4b98-b285-d166d9295462
This commit is contained in:
@@ -125,13 +125,15 @@ AC_SEARCH_LIBS(recvfrom, [socket])
|
||||
AC_HEADER_STDBOOL
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for sa_len in struct sockaddr)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>],
|
||||
[struct sockaddr sa; sa.sa_len = 0; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SIN_LEN, 1, Define to 1 if sockaddr_in has a sin_len member)],
|
||||
AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if sockaddr has a sa_len member, and corresponding sin_len and sun_len])],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
AC_ARG_WITH(lcov,
|
||||
|
@@ -223,6 +223,9 @@ public:
|
||||
void
|
||||
SocketSession::establish(const char& socket_file) {
|
||||
struct sockaddr_un sun;
|
||||
#ifdef HAVE_SA_LEN
|
||||
sun.sun_len = sizeof(struct sockaddr_un);
|
||||
#endif
|
||||
|
||||
if (strlen(&socket_file) >= sizeof(sun.sun_path)) {
|
||||
isc_throw(SessionError, "Unable to connect to message queue; "
|
||||
|
Reference in New Issue
Block a user