Commit dd700da1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Get rid of HAVE_SOCKLEN_T - refs #297

parent 54684436
...@@ -526,16 +526,22 @@ AC_CHECK_HEADERS(zlib.h, [ ...@@ -526,16 +526,22 @@ AC_CHECK_HEADERS(zlib.h, [
]) ])
dnl Check for socklen_t dnl Check for socklen_t
AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, AH_TEMPLATE(socklen_t, [Define to `int' if <sys/socket.h> does not define.])
[AC_TRY_COMPILE( AC_CACHE_CHECK([for socklen_t in sys/socket.h],
[#include <sys/types.h> ac_cv_type_socklen_t,
#include <sys/socket.h>], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
[socklen_t len = 42; return len;], [#if HAVE_SYS_TYPES_H
ac_cv_type_socklen_t=yes, # include <sys/types.h>
ac_cv_type_socklen_t=no)]) #endif
if test "${ac_cv_type_socklen_t}" != "no"; then #if HAVE_SYS_SOCKET_H
AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define if <sys/socket.h> defines socklen_t.]) # include <sys/socket.h>
fi #elif HAVE_WINSOCK2_H
# include <winsock2.h>
#endif]], [[socklen_t len; len = 0;]])],
ac_cv_type_socklen_t=yes,
ac_cv_type_socklen_t=no)])
AS_IF([test "$ac_cv_type_socklen_t" = no],
[AC_DEFINE(socklen_t, int)])
dnl Check for struct sockaddr_storage dnl Check for struct sockaddr_storage
AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if <sys/socket.h> does not define.]) AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if <sys/socket.h> does not define.])
......
...@@ -142,10 +142,6 @@ typedef uint8_t yuv_data_t; ...@@ -142,10 +142,6 @@ typedef uint8_t yuv_data_t;
/* Audio volume */ /* Audio volume */
typedef uint16_t audio_volume_t; typedef uint16_t audio_volume_t;
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
/** /**
* High precision date or time interval * High precision date or time interval
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment