summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-06-24 10:31:40 +0000
committerChristian Pointner <equinox@anytun.org>2009-06-24 10:31:40 +0000
commit8770711aa8e6ec875f9d79b5eceab80f1935c498 (patch)
treebc12fe73b631e16d5a0588b08d1ea5a51c121c5f
parentfixed build on linux (diff)
more portibke way of calling execve
-rw-r--r--src/bsd/tun.c3
-rw-r--r--src/linux/tun.c3
-rw-r--r--src/uanytun.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/bsd/tun.c b/src/bsd/tun.c
index 31ddd6c..966ac77 100644
--- a/src/bsd/tun.c
+++ b/src/bsd/tun.c
@@ -336,7 +336,8 @@ void tun_do_ifconfig(tun_device_t* dev)
}
char* const argv[] = { "/sbin/ifconfig", dev->actual_name_, dev->net_addr_, "netmask", dev->net_mask_, "mtu", mtu_str, end, NULL };
- uanytun_exec("/sbin/ifconfig", argv, NULL);
+ char* const evp[] = { NULL };
+ uanytun_exec("/sbin/ifconfig", argv, evp);
free(mtu_str);
}
diff --git a/src/linux/tun.c b/src/linux/tun.c
index 77f95fe..3fdf817 100644
--- a/src/linux/tun.c
+++ b/src/linux/tun.c
@@ -198,7 +198,8 @@ void tun_do_ifconfig(tun_device_t* dev)
}
char* const argv[] = { "/sbin/ifconfig", dev->actual_name_, dev->net_addr_, "netmask", dev->net_mask_, "mtu", mtu_str, NULL };
- uanytun_exec("/sbin/ifconfig", argv, NULL);
+ char* const evp[] = { NULL };
+ uanytun_exec("/sbin/ifconfig", argv, evp);
free(mtu_str);
}
diff --git a/src/uanytun.c b/src/uanytun.c
index 9f5e8b2..81a293b 100644
--- a/src/uanytun.c
+++ b/src/uanytun.c
@@ -402,7 +402,8 @@ int main(int argc, char* argv[])
if(opt.post_up_script_) {
log_printf(NOTICE, "executing post-up script '%s'", opt.post_up_script_);
char* const argv[] = { opt.post_up_script_, dev.actual_name_, NULL };
- int ret = uanytun_exec(opt.post_up_script_, argv, NULL);
+ char* const evp[] = { NULL };
+ int ret = uanytun_exec(opt.post_up_script_, argv, evp);
}