NaCl VPN implementations need to pass tunneled packets through the JavaScript APIs, as there is no tun device in the sandbox. Stub out os_setup_tun() so we don't get a compile error on ioctl(SIOCSIFMTU). Signed-off-by: Kevin Cernekee <cernekee at gmail.com> --- tun.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tun.c b/tun.c index 7d18db0..f52878f 100644 --- a/tun.c +++ b/tun.c @@ -175,7 +175,16 @@ intptr_t os_setup_tun(struct openconnect_info *vpninfo) return tun_fd; } -#else /* !__sun__ */ +#elif defined(__native_client__) + +intptr_t os_setup_tun(struct openconnect_info *vpninfo) +{ + vpn_progress(vpninfo, PRG_ERR, + _("tun device is unsupported on this platform\n")); + return -EOPNOTSUPP; +} + +#else /* !__sun__ && !__native_client__ */ /* MTU setting code for both Linux and BSD systems */ static void ifreq_set_ifname(struct openconnect_info *vpninfo, struct ifreq *ifr) -- 1.9.1