netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: apw@canonical.com
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, tim.gardner@canonical.com
Subject: Re: [PATCH 1/1] net: rtnetlink.h -- only include linux/netdevice.h when used by the kernel
Date: Mon, 15 Nov 2010 11:30:05 -0800 (PST)	[thread overview]
Message-ID: <20101115.113005.71581078.davem@davemloft.net> (raw)
In-Reply-To: <1289836919-19153-2-git-send-email-apw@canonical.com>

From: Andy Whitcroft <apw@canonical.com>
Date: Mon, 15 Nov 2010 16:01:59 +0000

> The commit below added a new helper dev_ingress_queue to cleanly obtain the
> ingress queue pointer.  This necessitated including 'linux/netdevice.h':
 ...
> However this include triggers issues for applications in userspace
> which use the rtnetlink interfaces.  Commonly this requires they include
> 'net/if.h' and 'linux/rtnetlink.h' leading to a compiler error as below:
> 
>   In file included from /usr/include/linux/netdevice.h:28:0,
>                    from /usr/include/linux/rtnetlink.h:9,
>                    from t.c:2:
>   /usr/include/linux/if.h:135:8: error: redefinition of ‘struct ifmap’
>   /usr/include/net/if.h:112:8: note: originally defined here
>   /usr/include/linux/if.h:169:8: error: redefinition of ‘struct ifreq’
>   /usr/include/net/if.h:127:8: note: originally defined here
>   /usr/include/linux/if.h:218:8: error: redefinition of ‘struct ifconf’
>   /usr/include/net/if.h:177:8: note: originally defined here
> 
> The new helper is only defined for the kernel and protected by __KERNEL__
> therefore we can simply pull the include down into the same protected
> section.
> 
> Signed-off-by: Andy Whitcroft <apw@canonical.com>

Applied, thanks Andy.

      reply	other threads:[~2010-11-15 19:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 16:01 [PATCH 0/1] rtnetlink/netdevice include triggers userspace compiler errors Andy Whitcroft
2010-11-15 16:01 ` [PATCH 1/1] net: rtnetlink.h -- only include linux/netdevice.h when used by the kernel Andy Whitcroft
2010-11-15 19:30   ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101115.113005.71581078.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=apw@canonical.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tim.gardner@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).