Re: [PATCH] core: Include <linux/if.h> instead of <net/if.h>
- From: Dan Williams <dcbw redhat com>
- To: Thomas Graf <tgraf redhat com>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATCH] core: Include <linux/if.h> instead of <net/if.h>
- Date: Fri, 30 Sep 2011 00:18:33 -0500
On Fri, 2011-09-23 at 13:46 +0200, Thomas Graf wrote:
> NM already includes <linux/if.h> in some places, f.e. nm-netlink-monitor and
> we can't mix usage of the two. Stick to using <linux/if.h> as it provides
> additional flag definitions such as operational link state and link mode.
Applied with a few fixups, thanks! (some failures in the wimax bits
because they aren't turned on unless you have the Intel wimax SDK
installed).
Dan
> Signed-off-by: Thomas Graf <tgraf redhat com>
> ---
> include/wireless-helper.h | 2 +-
> src/nm-device.c | 2 +-
> src/nm-system.c | 2 +-
> src/ppp-manager/nm-ppp-manager.c | 2 +-
> src/settings/plugins/ifcfg-rh/reader.c | 2 +-
> src/wimax/iwmxsdk.c | 2 +-
> src/wimax/nm-device-wimax.c | 2 +-
> 7 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/include/wireless-helper.h b/include/wireless-helper.h
> index d150ef7..2e4509a 100644
> --- a/include/wireless-helper.h
> +++ b/include/wireless-helper.h
> @@ -27,6 +27,6 @@
> #include <sys/types.h>
> #include <linux/types.h>
> #include <sys/socket.h>
> -#include <net/if.h>
> +#include <linux/if.h>
> #include <wireless.h>
>
> diff --git a/src/nm-device.c b/src/nm-device.c
> index c0b1b87..559606c 100644
> --- a/src/nm-device.c
> +++ b/src/nm-device.c
> @@ -25,7 +25,6 @@
> #include <dbus/dbus.h>
> #include <netinet/in.h>
> #include <string.h>
> -#include <net/if.h>
> #include <unistd.h>
> #include <errno.h>
> #include <sys/ioctl.h>
> @@ -34,6 +33,7 @@
> #include <sys/wait.h>
> #include <arpa/inet.h>
> #include <fcntl.h>
> +#include <linux/if.h>
>
> #include "nm-glib-compat.h"
> #include "nm-device-interface.h"
> diff --git a/src/nm-system.c b/src/nm-system.c
> index 0b29468..473fcec 100644
> --- a/src/nm-system.c
> +++ b/src/nm-system.c
> @@ -40,7 +40,7 @@
> #include <netdb.h>
> #include <glib.h>
> #include <ctype.h>
> -#include <net/if.h>
> +#include <linux/if.h>
>
> #include "nm-system.h"
> #include "nm-device.h"
> diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
> index 522c075..3546f8d 100644
> --- a/src/ppp-manager/nm-ppp-manager.c
> +++ b/src/ppp-manager/nm-ppp-manager.c
> @@ -32,7 +32,7 @@
> #include <sys/socket.h>
> #include <sys/ioctl.h>
> #include <asm/types.h>
> -#include <net/if.h>
> +#include <linux/if.h>
> #include <sys/stat.h>
>
> #include <linux/ppp_defs.h>
> diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c
> index cdf5889..ab94db6 100644
> --- a/src/settings/plugins/ifcfg-rh/reader.c
> +++ b/src/settings/plugins/ifcfg-rh/reader.c
> @@ -28,10 +28,10 @@
> #include <ctype.h>
> #include <sys/inotify.h>
> #include <errno.h>
> -#include <net/if.h>
> #include <sys/ioctl.h>
> #include <unistd.h>
> #include <netinet/ether.h>
> +#include <linux/if.h>
>
> #ifndef __user
> #define __user
> diff --git a/src/wimax/iwmxsdk.c b/src/wimax/iwmxsdk.c
> index ff6b553..09a00b2 100644
> --- a/src/wimax/iwmxsdk.c
> +++ b/src/wimax/iwmxsdk.c
> @@ -27,7 +27,7 @@
> #include <stdlib.h>
> #include <errno.h>
> #include <string.h>
> -#include <net/if.h>
> +#include <linux/if.h>
>
> #include <glib.h>
>
> diff --git a/src/wimax/nm-device-wimax.c b/src/wimax/nm-device-wimax.c
> index b6afc27..cbb5e52 100644
> --- a/src/wimax/nm-device-wimax.c
> +++ b/src/wimax/nm-device-wimax.c
> @@ -23,7 +23,7 @@
> #include <unistd.h>
> #include <sys/ioctl.h>
> #include <net/ethernet.h>
> -#include <net/if.h>
> +#include <linux/if.h>
>
> #include <WiMaxAPI.h>
> #include <WiMaxAPIEx.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]