projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5dc4ade
)
Correct inclusion of standard if_tun.h header file.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 15 Jul 2001 14:21:12 +0000
(14:21 +0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 15 Jul 2001 14:21:12 +0000
(14:21 +0000)
m4/tuntap.m4
patch
|
blob
|
history
src/net.c
patch
|
blob
|
history
diff --git
a/m4/tuntap.m4
b/m4/tuntap.m4
index 147c6794a1e1b5574a5ddd1c5c0d10177dcfb872..0bee1ce3709f7e25f009bd52511ef3fe6c4ad8c5 100644
(file)
--- a/
m4/tuntap.m4
+++ b/
m4/tuntap.m4
@@
-16,7
+16,7
@@
AC_CACHE_CHECK([for linux/if_tun.h], tinc_cv_linux_if_tun_h,
if_tun_h="\"$kerneldir/include/linux/if_tun.h\"",
[AC_TRY_COMPILE([#include <linux/if_tun.h>],
[int a = IFF_TAP;],
if_tun_h="\"$kerneldir/include/linux/if_tun.h\"",
[AC_TRY_COMPILE([#include <linux/if_tun.h>],
[int a = IFF_TAP;],
- if_tun_h="
<linux/if_tun.h>
",
+ if_tun_h="
default
",
if_tun_h="no"
)]
)
if_tun_h="no"
)]
)
@@
-30,8
+30,10
@@
AC_CACHE_CHECK([for linux/if_tun.h], tinc_cv_linux_if_tun_h,
if test $tinc_cv_linux_if_tun_h != none; then
AC_DEFINE(HAVE_TUNTAP)
if test $tinc_cv_linux_if_tun_h != none; then
AC_DEFINE(HAVE_TUNTAP)
- AC_DEFINE_UNQUOTED(LINUX_IF_TUN_H, $tinc_cv_linux_if_tun_h)
- AC_SUBST(LINUX_IF_TUN_H)
+ if test $tinc_cv_linux_if_tun_h != default; then
+ AC_DEFINE_UNQUOTED(LINUX_IF_TUN_H, $tinc_cv_linux_if_tun_h)
+ fi
fi
fi
+AC_SUBST(LINUX_IF_TUN_H)
AC_SUBST(HAVE_TUNTAP)
])
AC_SUBST(HAVE_TUNTAP)
])
diff --git
a/src/net.c
b/src/net.c
index 309079b830dc4278443e663a5987025b7ad997d0..4c5956e8b9fc324a302c59d7fe850cf400f1d2f2 100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net.c,v 1.35.4.11
8 2001/07/04 08:41:36
guus Exp $
+ $Id: net.c,v 1.35.4.11
9 2001/07/15 14:21:12
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-54,7
+54,15
@@
#endif
#ifdef HAVE_TUNTAP
#endif
#ifdef HAVE_TUNTAP
-#include LINUX_IF_TUN_H
+ #ifdef HAVE_LINUX
+ #ifdef LINUX_IF_TUN_H
+ #include LINUX_IF_TUN_H
+ #else
+ #include <linux/if_tun.h>
+ #endif
+ #else
+ #include <net/if_tun.h>
+ #endif
#endif
#include <utils.h>
#endif
#include <utils.h>