summaryrefslogtreecommitdiffstats
path: root/src/openvpn
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvpn')
-rw-r--r--src/openvpn/route.c2
-rw-r--r--src/openvpn/syshead.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index bf7af63..a628e77 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -2386,7 +2386,7 @@ get_default_gateway (struct route_gateway_info *rgi)
{
char line[256];
int count = 0;
- unsigned int lowest_metric = ~0;
+ unsigned int lowest_metric = UINT_MAX;
in_addr_t best_gw = 0;
bool found = false;
while (fgets (line, sizeof (line), fp) != NULL)
diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h
index e60dc44..0595b67 100644
--- a/src/openvpn/syshead.h
+++ b/src/openvpn/syshead.h
@@ -129,6 +129,10 @@
#include <signal.h>
#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif