From 43e340cdab116cf89db0a354f4be679485b53d3f Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Sun, 1 Apr 2007 23:16:51 +0000 Subject: [PATCH] fix /dev/tun path issue (closes: #1541), bump release number SVN-Revision: 6813 --- net/chillispot/Makefile | 2 +- .../patches/010-linux_dev_tun.patch | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 net/chillispot/patches/010-linux_dev_tun.patch diff --git a/net/chillispot/Makefile b/net/chillispot/Makefile index 1d870ac428..8dea025902 100644 --- a/net/chillispot/Makefile +++ b/net/chillispot/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=chillispot PKG_VERSION:=1.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.chillispot.org/download diff --git a/net/chillispot/patches/010-linux_dev_tun.patch b/net/chillispot/patches/010-linux_dev_tun.patch new file mode 100644 index 0000000000..24d8deb3eb --- /dev/null +++ b/net/chillispot/patches/010-linux_dev_tun.patch @@ -0,0 +1,31 @@ +--- chillispot-1.1.0/src/tun.c.orig 2006-09-24 19:48:25.000000000 +0200 ++++ chillispot-1.1.0/src/tun.c 2007-04-02 00:38:12.000000000 +0200 +@@ -77,6 +77,7 @@ + #include + #include + #include ++#include + + #elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) + #include +@@ -673,6 +674,11 @@ + + #if defined(__linux__) + struct ifreq ifr; ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) ++# define TUN_DEV "/dev/tun" ++# else ++# define TUN_DEV "/dev/net/tun" ++# endif + + #elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) + char devname[IFNAMSIZ+5]; /* "/dev/" + ifname */ +@@ -701,7 +707,7 @@ + + #if defined(__linux__) + /* Open the actual tun device */ +- if (((*tun)->fd = open("/dev/net/tun", O_RDWR)) < 0) { ++ if (((*tun)->fd = open(TUN_DEV, O_RDWR)) < 0) { + sys_err(LOG_ERR, __FILE__, __LINE__, errno, "open() failed"); + return -1; + } -- 2.30.2