From: Dave Jones <davej@redhat.com>
To: cliff white <cliffw@osdl.org>
Cc: jgarzik@pobox.com, netdev@oss.sgi.com
Subject: Re: gcc confused about static inline. - route.c
Date: Mon, 28 Mar 2005 16:41:03 -0500 [thread overview]
Message-ID: <20050328214103.GA3609@redhat.com> (raw)
In-Reply-To: <20050328132314.480b8b1d@es175>
On Mon, Mar 28, 2005 at 01:23:14PM -0800, cliff white wrote:
>
> Building the gkernel bits, have this error:
>
> net/ipv4/route.c: In function `rt_remove_balanced_route':
> net/ipv4/route.c:151: sorry, unimplemented: inlining failed in call to 'compare_keys': function body not available
> net/ipv4/route.c:540: sorry, unimplemented: called from here
>
> route.c has this define at line 151
> :
> static inline int compare_keys(struct flowi *fl1, struct flowi *fl2);
>
> function body is defined starting at line 861.
>
> We are using gcc 3.4.2 right now, is there a way to fix this?
> thanks
> cliffw
Shuffling the order of the functions fixed this for me.
Dave
Signed-off-by: Dave Jones <davej@redhat.com>
diff -urNp --exclude-from=/home/davej/.exclude linux-10001/init/Makefile linux-10002/init/Makefile
--- linux-2.6.11/net/ipv4/route.c~ 2005-03-24 19:18:24.000000000 -0500
+++ linux-2.6.11/net/ipv4/route.c 2005-03-24 19:19:39.000000000 -0500
@@ -520,6 +520,13 @@ static inline u32 rt_score(struct rtable
return score;
}
+static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
+{
+ return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 &&
+ fl1->oif == fl2->oif &&
+ fl1->iif == fl2->iif;
+}
+
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
static struct rtable **rt_remove_balanced_route(struct rtable **chain_head,
struct rtable *expentry,
@@ -858,13 +865,6 @@ work_done:
out: return 0;
}
-static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
-{
- return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 &&
- fl1->oif == fl2->oif &&
- fl1->iif == fl2->iif;
-}
-
static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp)
{
struct rtable *rth, **rthp;
next prev parent reply other threads:[~2005-03-28 21:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-28 21:23 gcc confused about static inline. - route.c cliff white
2005-03-28 21:41 ` Dave Jones [this message]
2005-03-28 22:59 ` cliff white
2005-03-28 21:53 ` Francois Romieu
2005-03-28 23:00 ` cliff white
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=20050328214103.GA3609@redhat.com \
--to=davej@redhat.com \
--cc=cliffw@osdl.org \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.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).