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 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
+AC_SUBST(LINUX_IF_TUN_H)
AC_SUBST(HAVE_TUNTAP)
])
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.118 2001/07/04 08:41:36 guus Exp $
+ $Id: net.c,v 1.35.4.119 2001/07/15 14:21:12 guus Exp $
*/
#include "config.h"
#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>