2 dnl Copyright (C) 2005 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 dnl From Simon Josefsson.
9 AC_DEFUN([gl_SOCKLEN_T],
11 AC_CHECK_HEADERS_ONCE(sys/types.h sys/socket.h)
12 AC_CHECK_TYPE([socklen_t],, [AC_DEFINE([socklen_t], [int],
13 [Map `socklen_t' to `int' if it is missing.])], [
14 #ifdef HAVE_SYS_TYPES_H
15 # include <sys/types.h>
17 #ifdef HAVE_SYS_SOCKET_H
18 # include <sys/socket.h>