summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-04-15 19:42:09 +0000
committerChristian Pointner <equinox@anytun.org>2008-04-15 19:42:09 +0000
commitfd3d4ef60bab6a28cab85724d5a56a31a2573c5f (patch)
tree7049bbf1062d137fb90caed50d1d951d506cdc83
parentadded make target anytun-nosync for basic bsd support (diff)
build linux specific part only on linux
-rw-r--r--src/tunDevice.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/tunDevice.cpp b/src/tunDevice.cpp
index 78b3d19..b3c07b0 100644
--- a/src/tunDevice.cpp
+++ b/src/tunDevice.cpp
@@ -93,9 +93,13 @@ TunDevice::TunDevice(const char* dev_name,const char* dev_type, const char* ifcf
// rp = inet_addr("192.168.199.1");
dev_ = init_tun(dev_name, dev_type, ifcfg_lp, ifcfg_rnmp, lp, rp, 0, NULL);
- struct frame frame; // just for win32
- struct tuntap_options options; // win32 & linux
- options.txqueuelen = 100; // just for linux
+ struct frame frame;
+ struct tuntap_options options;
+
+#ifdef TARGET_LINUX
+ options.txqueuelen = 100;
+#endif
+
init_tun_post(dev_, &frame, &options);
if(!dev_)
throw std::runtime_error("can't init tun/tap device");