Fix build on OpenBSD

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2020-03-24 17:22:37 +00:00
parent 50f002b7f8
commit e0546ec46a
2 changed files with 3 additions and 1 deletions

View File

@@ -12,6 +12,8 @@
#include <errno.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifndef PACKAGE_NAME
#define PACKAGE_NAME "glorytun"

View File

@@ -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__ */