On Sat, Feb 28, 2015 at 04:08:34PM +0000, Christos Zoulas wrote:
> In article 
> <cak4o1wwm2txkpdo_dhdmw-wxii_nlf+dypzc6turtdmz+-5...@mail.gmail.com>,
> Justin Cormack  <[email protected]> wrote:
> >On 28 February 2015 at 11:17, Patrick Welche <[email protected]> wrote:
> >> The surprise is that when building rump, gcc complains with:
> >>
> >>
> >> /usr/src/sys/rump/net/lib/libnet/../../../../net/route.c:1010:21:
> >error: initializer element is not constant
> >>  static const struct in_addr inmask32 = {.s_addr = INADDR_BROADCAST};
> >>                      ^
> >> /usr/src/sys/rump/net/lib/libnet/../../../../net/route.c:1010:21:
> >error: (near initialization for 'inmask32.s_addr')
> >>
> >>
> >> which certainly looks constant. Problem is that INADDR_BROADCAST may
> >> contain a call to htonl(), e.g. try
> >
> >> Given that 0xffffffff is the same in either order, there is an obvious
> >> kludge, but any thoughts on an elegant solution?
> >
> >Hmm, I hadnt seen that. Maybe define an HTONL macro that uses shifts
> >and masks ifdef little endian so it is all done at compile time?
> 
> Are you trying to compile without optimization?

Yes - I have DBG=-g -O0 in Makefile.rump

I thought that would help trying to step through a rump kernel in gdb - not
a good idea? (removing now)

I suppose that is why no one else is seeing this...


Cheers,

Patrick

Reply via email to