diff options
author | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2004-07-23 12:42:14 +0000 |
---|---|---|
committer | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2004-07-23 12:42:14 +0000 |
commit | 7cd8ab4425c2f0b1349be5760cd4e39f92b9d2af (patch) | |
tree | f94f5bf1388362192049acffb7539ee812071e72 /m4/_xine.m4 | |
parent | d9e3ce08901c5aea4c580dfe2969c8658d5fe958 (diff) | |
download | xine-lib-7cd8ab4425c2f0b1349be5760cd4e39f92b9d2af.tar.gz xine-lib-7cd8ab4425c2f0b1349be5760cd4e39f92b9d2af.tar.bz2 |
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
Diffstat (limited to 'm4/_xine.m4')
-rw-r--r-- | m4/_xine.m4 | 35 |
1 files changed, 35 insertions, 0 deletions
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 <sys/types.h> +#include <sys/socket.h> + ],[ +socklen_t a=0; +getsockname(0,(struct sockaddr*)0, &a); + ], + ac_cv_socklen_t=socklen_t, + AC_TRY_COMPILE([ +#include <sys/types.h> +#include <sys/socket.h> + ],[ +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 +]) |