diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/_xine.m4 | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/m4/_xine.m4 b/m4/_xine.m4 index d8e675a16..5fae550d8 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -375,30 +375,31 @@ _ACEOF dnl Check for the type of the third argument of getsockname AC_DEFUN([AC_CHECK_SOCKLEN_T], [ AC_MSG_CHECKING(for socklen_t) + AC_LANG_PUSH(C++) + AC_CACHE_VAL(ac_cv_socklen_t, [ - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([ + 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([ + [ + 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_LANG_POP([C++]) AC_MSG_RESULT($ac_cv_socklen_t) if test "$ac_cv_socklen_t" != "socklen_t"; then |