#include "sudoers.h"
#include "interfaces.h"
+#ifndef INADDR_NONE
+# define INADDR_NONE ((unsigned int)-1)
+#endif
+
/*
* Parse a space-delimited list of IP address/netmask pairs and
* store in a list of interface structures.
ifp->family = AF_INET;
ifp->addr.ip4.s_addr = inet_addr(addr);
ifp->netmask.ip4.s_addr = inet_addr(mask);
- if (ifp->addr.ip4.s_addr == (in_addr_t)-1 ||
- ifp->netmask.ip4.s_addr == (in_addr_t)-1) {
+ if (ifp->addr.ip4.s_addr == INADDR_NONE ||
+ ifp->netmask.ip4.s_addr == INADDR_NONE) {
efree(ifp);
continue;
}