From 7cd8ab4425c2f0b1349be5760cd4e39f92b9d2af Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Fri, 23 Jul 2004 12:42:14 +0000 Subject: made io_helper.c compile under Solaris 2.6 (socklen_t undefine type) (close #992824) CVS patchset: 6840 CVS date: 2004/07/23 12:42:14 --- m4/_xine.m4 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'm4/_xine.m4') diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 2051eaf4a..d8e675a16 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -371,3 +371,38 @@ _ACEOF fi ;; esac ])# AC_PROG_LIBTOOL_SANITYCHECK + +dnl Check for the type of the third argument of getsockname +AC_DEFUN([AC_CHECK_SOCKLEN_T], [ + AC_MSG_CHECKING(for socklen_t) + AC_CACHE_VAL(ac_cv_socklen_t, [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ +#include +#include + ],[ +socklen_t a=0; +getsockname(0,(struct sockaddr*)0, &a); + ], + ac_cv_socklen_t=socklen_t, + AC_TRY_COMPILE([ +#include +#include + ],[ +int a=0; +getsockname(0,(struct sockaddr*)0, &a); + ], + ac_cv_socklen_t=int, + ac_cv_socklen_t=size_t + ) + ) + AC_LANG_RESTORE + ]) + + AC_MSG_RESULT($ac_cv_socklen_t) + if test "$ac_cv_socklen_t" != "socklen_t"; then + AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t, + [Define the real type of socklen_t]) + fi +]) -- cgit v1.2.3