Commit 9b1a802a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Check for sa_len

parent 25df5d5d
......@@ -18,5 +18,5 @@ endif
man1_MANS=sapserver.1
dist_sysconf_DATA=sap.cfg
EXTRA_DIST = $(man1_MANS) m4/getopt.m4 admin/config.rpath
EXTRA_DIST = $(man1_MANS) m4/getopt.m4 m4/sockaddr.m4 admin/config.rpath
-- Changes from version 0.3.3 to version 0.3.4
* Fix announce timer
* Set sockaddr.sa_len on BSDs
-- Changes from version 0.3.2 to version 0.3.3
* Avoid some useless memory allocations
......
......@@ -32,6 +32,8 @@ AM_INIT_AUTOMAKE([check-news dist-bzip2 no-dist-gzip std-options])
dnl On the fly charset transcoding
AM_ICONV
RDC_STRUCT_SOCKADDR_LEN
dnl Enable/Disable slp
AS_IF([test "x${enable_slp}" == "x"],
[enable_slp="no"])
......
# sockaddr.m4
# Copyright © 2003-2006 Rémi Denis-Courmont
# <rdenis (at) simphalempin (dot) com>.
# This file (sockaddr.m4) is free software; unlimited permission to
# copy and/or distribute it , with or without modifications, as long
# as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
dnl SHOULD check <sys/socket.h>, <winsock2.h> before that
AC_DEFUN([RDC_STRUCT_SOCKADDR_LEN],
[AC_LANG_ASSERT(C)
AH_TEMPLATE(HAVE_SA_LEN, [Define to 1 if `struct sockaddr' has a `sa_len' member.])
AC_CACHE_CHECK([if struct sockaddr has a sa_len member],
rdc_cv_struct_sockaddr_len,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
[#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <sys/socket.h>]], [[struct sockaddr addr; addr.sa_len = 0;]])],
rdc_cv_struct_sockaddr_len=yes,
rdc_cv_struct_sockaddr_len=no)])
AS_IF([test $rdc_cv_struct_sockaddr_len = yes],
[AC_DEFINE(HAVE_SA_LEN)])
])
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