[PATCH] Include netinet/in.h in libbb.h

Bernhard Fischer rep.nop at aon.at
Sat Jun 3 21:16:47 UTC 2006


On Sat, Jun 03, 2006 at 09:18:35PM +0200, Bernhard Fischer wrote:
>On Sat, Jun 03, 2006 at 12:25:36PM -0600, Shaun Jackman wrote:
>>On 7/25/05, Rob Landley <rob at landley.net> wrote:
>>...
>>>But applied anyway...
>>>
>>>Rob
>>
>>This patch was never applied; please apply it now.
>>
>>libbb.h uses struct sockaddr_in which is defined in netinet/in.h but
>>never included.
>
>This patch shouldn't be needed anymore since the order of includes were
>restructered recently. Applets have to include busybox.h as the first
>include, lib*/* has to include libbb.h as the first include.
>
>Applets and library functions MUST not include any header which is
>included by platform.h, busybox.h and platform.h, libbb.h respectively.
>
>See e.g. r15266 and r15267 from yesterday (and yes, there still are some
>directories which aren't yet converted. We'll get to them soon).

Hm. We'll break dmalloc support with this header move, i think.
#include <dmalloc.h> should be after all other includes..

What should we do about this? I'd go for an
#include "busybox_dmalloc.h"
that basically reads
#ifndef BUSYBOX_DMALLOC_H
#define BUSYBOX_DMALLOC_H 1
#ifdef DMALLOC
#include <dmalloc.h>
#endif
#endif /* BUSYBOX_DMALLOC_H */

What do you think?



More information about the busybox mailing list