[ISOLATED] Re: was error in latest build, svn 15200: Enable getopt long
Robert P. J. Day
rpjday at mindspring.com
Sun May 28 20:57:09 UTC 2006
ok, just before i shut down and head home, a little more info. i've
further isolated the problem to the order of the two includes in
hdparm.c:
#include "busybox.h"
#include <asm/byteorder.h>
as long as busybox.h comes first, the hdparm.c compile works. if i
swap the order, failure. which is starting to make sense as the build
error with hdparm.c involves these lines in /usr/include/netinet/in.h
(starts at line 354):
===========================================
...
extern uint32_t ntohl(uint32_t __netlong) __THROW __attribute__
((__const__));
extern uint16_t ntohs(uint16_t __netshort)
__THROW __attribute__ ((__const__));
extern uint32_t htonl(uint32_t __hostlong)
__THROW __attribute__ ((__const__));
extern uint16_t htons(uint16_t __hostshort)
__THROW __attribute__ ((__const__));
...
===========================================
so why would these cause a problem? let's follow the inclusions of
/usr/include/asm/byteorder.h:
...
#include <linux/byteorder/little_endian.h>
...
ok, let's go there:
...
#include <linux/byteorder/generic.h>
...
and if you go to *that* header file, there's a whole mess of stuff
involving undefining and redefining those four byte-ordering routines.
as i read it, including that initial byteorder.h file seems to be
making a mess of those four definitions somehow, which screws up their
declaration in /usr/include/netinet/in.h later.
does any of that make sense? in any event, including that
byteorder.h file before busybox.h is what's causing the problem here.
rday
More information about the busybox
mailing list