From e0546ec46ad28aa6d18488bf42c819f65f56e1c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Tue, 24 Mar 2020 17:22:37 +0000 Subject: [PATCH] Fix build on OpenBSD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- src/common.h | 2 ++ src/tun.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common.h b/src/common.h index 4f0b0f4..7d7cfe4 100644 --- a/src/common.h +++ b/src/common.h @@ -12,6 +12,8 @@ #include #include +#include +#include #ifndef PACKAGE_NAME #define PACKAGE_NAME "glorytun" diff --git a/src/tun.c b/src/tun.c index 61b3d12..d4b2ce0 100644 --- a/src/tun.c +++ b/src/tun.c @@ -138,7 +138,7 @@ tun_create_by_name(char *name, size_t len, const char *dev_name) return -1; } - return open(tmp, O_RDWR); + return open(name, O_RDWR); } #endif /* not __APPLE__ */