1 dnl @synopsis TYPE_SOCKLEN_T
3 dnl Check whether sys/socket.h defines type socklen_t. Please note
4 dnl that some systems require sys/types.h to be included before
5 dnl sys/socket.h can be compiled.
8 dnl @author Lars Brinkhoff <lars@nocrew.org>
10 AC_DEFUN([AX_TYPE_SOCKLEN_T],
11 [AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
14 [#include <sys/types.h>
15 #include <sys/socket.h>],
16 [socklen_t len = 42; return 0;],
17 ac_cv_type_socklen_t=yes,
18 ac_cv_type_socklen_t=no)
20 if test $ac_cv_type_socklen_t != yes; then
21 AC_DEFINE(socklen_t, int, [define socklen_t if sys headers don't do that])