Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiyuu Nobori <da.git@softether.co.jp>2014-02-05 20:35:26 +0400
committerDaiyuu Nobori <da.git@softether.co.jp>2014-02-05 20:35:26 +0400
commitcdd4540baaae47865402cf208566324c39945446 (patch)
treee96677efe306ac3768565dcdd3f49ace9cffd2d8 /src/Mayaqua
parent001fd910fedfd0ef1690a9d3c50c1a28d1680d1d (diff)
parent8779e59295b857c38f5f453080a5e87be07c1fc3 (diff)
Merge pull request #10 from nattoheaven/tuntaposx
Supporting VLAN for Mac OS X using TunTapOSX
Diffstat (limited to 'src/Mayaqua')
-rw-r--r--src/Mayaqua/TunTap.h17
-rw-r--r--src/Mayaqua/Unix.c4
2 files changed, 9 insertions, 12 deletions
diff --git a/src/Mayaqua/TunTap.h b/src/Mayaqua/TunTap.h
index 738d3e4f..58c72d85 100644
--- a/src/Mayaqua/TunTap.h
+++ b/src/Mayaqua/TunTap.h
@@ -236,11 +236,14 @@ struct tundladdr {
#else // UNIX_SOLARIS
-#ifdef UNIX_BSD
+#if defined(UNIX_BSD) || (!defined(NO_VLAN) && defined(UNIX_MACOS))
// -----------------------------------------------------------------
// Tap header for FreeBSD
// -----------------------------------------------------------------
+// -----------------------------------------------------------------
+// Tap header For MacOS
+// -----------------------------------------------------------------
/* $NetBSD: if_tun.h,v 1.5 1994/06/29 06:36:27 cgd Exp $ */
/*
@@ -292,17 +295,7 @@ struct tuninfo {
#else // UNIX_BSD
-#ifdef UNIX_MACOS
-
-// -----------------------------------------------------------------
-// Tap header For MacOS
-// -----------------------------------------------------------------
-
-#else // UNIX_MACOS
-
-#endif // UNIX_MACOS
-
-#endif // UNIX_BSD
+#endif // UNIX_BSD || UNIX_MACOS
#endif // UNIX_SOLARIS
diff --git a/src/Mayaqua/Unix.c b/src/Mayaqua/Unix.c
index 25d9aabd..03edacca 100644
--- a/src/Mayaqua/Unix.c
+++ b/src/Mayaqua/Unix.c
@@ -106,6 +106,7 @@
// Struct statfs for MacOS X
#ifdef UNIX_MACOS
+#ifdef NO_VLAN
typedef struct fsid { int32_t val[2]; } fsid_t;
struct statfs {
short f_otype; /* TEMPORARY SHADOW COPY OF f_type */
@@ -127,6 +128,9 @@ struct statfs {
char f_mntonname[90]; /* directory on which mounted */
char f_mntfromname[90];/* mounted filesystem */
};
+#else
+#include <sys/mount.h>
+#endif
#endif // UNIX_MACOS
// Scandir() function for Solaris