diff options
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | 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 <sys/socket.h> ) -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 <netinet/in.h> #include <unistd.h> +#ifdef MSG_MAXIOVLEN +#define ENET_BUFFER_MAXIMUM MSG_MAXIOVLEN +#endif + typedef int ENetSocket; enum |