#include "defs.h"
#include "msghdr.h"
+#include <limits.h>
#include <arpa/inet.h>
#include <netinet/in.h>
}
}
-#ifndef UIO_MAXIOV
-# define UIO_MAXIOV 1024
-#endif
-
static unsigned int
get_optmem_max(void)
{
if (!optmem_max) {
if (read_int_from_file("/proc/sys/net/core/optmem_max",
&optmem_max) || optmem_max <= 0) {
- optmem_max = sizeof(long long) * (2 * UIO_MAXIOV + 512);
+ optmem_max = sizeof(long long) * (2 * IOV_MAX + 512);
} else {
optmem_max = (optmem_max + sizeof(long long) - 1)
& ~(sizeof(long long) - 1);