From bd4e5035bcc2f6a5bbad63c39f8fc3423cac55d8 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Thu, 9 May 2013 15:04:01 +0300 Subject: move MSG_MAXIOVLEN check out of configure.ac --- configure.ac | 3 --- include/enet/unix.h | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e23d7a7..f4d7dfb 100644 --- a/configure.ac +++ b/configure.ac @@ -21,9 +21,6 @@ AC_CHECK_TYPE(socklen_t, [AC_DEFINE(HAS_SOCKLEN_T)], , #include ) -AC_EGREP_HEADER(MSG_MAXIOVLEN, /usr/include/sys/socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN])) -AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN])) - AC_CONFIG_FILES([Makefile libenet.pc]) AC_OUTPUT diff --git a/include/enet/unix.h b/include/enet/unix.h index 087015e..6aae21a 100644 --- a/include/enet/unix.h +++ b/include/enet/unix.h @@ -11,6 +11,10 @@ #include #include +#ifdef MSG_MAXIOVLEN +#define ENET_BUFFER_MAXIMUM MSG_MAXIOVLEN +#endif + typedef int ENetSocket; enum -- cgit v1.2.3