Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dhcpd build break




The code in question, on my machine, says

                        o->len = encode_rfc1035(hostname, p + 1);
                        if (o->len == 0)
                                *p = 0x04;
                   o->len = htons(++o->len);
                }

I don't know where htons() is defined, but I suspect that you might be evaluating the argument twice, so ++o->len is a bad thing!

You might try splitting into two lines

                        o->len++;
                        o->len = htons(o->len);




On Sat, 22 Jun 2013, Roy Marples wrote:

On 22/06/2013 0:37, Paul Goyette wrote:
With sources updated at 20:18:15 UTC, it seems that a large number of
ports are failing to build.  Everything I have noticed seems to be a
"big-endian" architecture:

/build/netbsd-local/src/external/bsd/dhcpcd/dist/dhcp6.c: In function
'dhcp6_makemessage':
/build/netbsd-local/src/external/bsd/dhcpcd/dist/dhcp6.c:641:11:
error: operation on 'o->len' may be undefined

The same evb*-eb ports seems to build just fine on their
corresponding little-endian ports.

The code in question:

                       o = D6_NEXT_OPTION(o);
                       o->code = htons(D6_OPTION_ORO);
                       o->len = 0;

Can anyone with Big Endian foo or compilter foo explain this one to me?
I'm not sure how to fix a = 0 assignment on BE ....
Kinda of odd as the code above it seems to be ok and is similar. Compiler error?

Roy

!DSPAM:51c4fea9150701873610243!



-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index