Patchwork tap: Remove double include of util.h

login
register
mail settings
Submitter Andreas Färber
Date Sept. 28, 2010, 9:48 p.m.
Message ID <1285710522-6061-1-git-send-email-andreas.faerber@web.de>
Download mbox | patch
Permalink /patch/66028/
State New
Headers show

Comments

Andreas Färber - Sept. 28, 2010, 9:48 p.m.
If neither of __FreeBSD__, __FreeBSD_kernel__ and __DragonFly__ is defined,
util.h is included from tap-bsd.c.
Don't include it again if __OpenBSD__ is defined.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
 net/tap-bsd.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
Blue Swirl - Sept. 29, 2010, 4:16 p.m.
Thanks, applied.

On Tue, Sep 28, 2010 at 9:48 PM, Andreas Färber <andreas.faerber@web.de> wrote:
> If neither of __FreeBSD__, __FreeBSD_kernel__ and __DragonFly__ is defined,
> util.h is included from tap-bsd.c.
> Don't include it again if __OpenBSD__ is defined.
>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
> ---
>  net/tap-bsd.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/net/tap-bsd.c b/net/tap-bsd.c
> index 959939e..0c0ca5b 100644
> --- a/net/tap-bsd.c
> +++ b/net/tap-bsd.c
> @@ -37,10 +37,6 @@
>  #include <util.h>
>  #endif
>
> -#if defined(__OpenBSD__)
> -#include <util.h>
> -#endif
> -
>  int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required)
>  {
>     int fd;
> --
> 1.7.3
>
>

Patch

diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index 959939e..0c0ca5b 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -37,10 +37,6 @@ 
 #include <util.h>
 #endif
 
-#if defined(__OpenBSD__)
-#include <util.h>
-#endif
-
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required)
 {
     int fd;