mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-31 11:08:24 +02:00
build: make VLAN code compatible with older kernels
Apparently VLAN_FLAG_LOOSE_BINDING isn't in older kernels like 2.6.32.
This commit is contained in:
parent
6f19e1e18c
commit
7f717f905b
2 changed files with 27 additions and 0 deletions
22
configure.ac
22
configure.ac
|
|
@ -261,6 +261,28 @@ if test "$ac_have_nl80211" = no; then
|
|||
AC_MSG_ERROR(Linux kernel development header linux/nl80211.h not installed or not functional)
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Default to using WEXT but allow it to be disabled
|
||||
dnl
|
||||
AC_MSG_CHECKING([Linux kernel VLAN_FLAG_LOOSE_BINDING enum value])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#ifndef __user
|
||||
#define __user
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/if_vlan.h>]],
|
||||
[[unsigned int a = VLAN_FLAG_LOOSE_BINDING;]])],
|
||||
[ac_have_vlan_flag_loose_binding=yes],
|
||||
[ac_have_vlan_flag_loose_binding=no])
|
||||
AC_MSG_RESULT($ac_have_vlan_flag_loose_binding)
|
||||
if test "$ac_have_vlan_flag_loose_binding" = yes; then
|
||||
AC_DEFINE(HAVE_VLAN_FLAG_LOOSE_BINDING, 1, [Define if you have VLAN_FLAG_LOOSE_BINDING])
|
||||
else
|
||||
AC_DEFINE(HAVE_VLAN_FLAG_LOOSE_BINDING, 0, [Define if you have VLAN_FLAG_LOOSE_BINDING])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Checks for libm - needed for pow()
|
||||
dnl
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@
|
|||
#include <netlink/route/link/vlan.h>
|
||||
#endif
|
||||
|
||||
#if !HAVE_VLAN_FLAG_LOOSE_BINDING
|
||||
/* Older kernels don't have this flag */
|
||||
#define VLAN_FLAG_LOOSE_BINDING 0x04
|
||||
#endif
|
||||
|
||||
static void nm_system_device_set_priority (int ifindex,
|
||||
NMIP4Config *config,
|
||||
int priority);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue