[Libguestfs] [PATCH 2/6] daemon: Missing #includes revealed by cross-compiling.

Jim Meyering jim at meyering.net
Fri Nov 20 11:39:49 UTC 2009


Richard W.M. Jones wrote:
> On Fri, Nov 20, 2009 at 12:25:13PM +0100, Jim Meyering wrote:
>> Richard W.M. Jones wrote:
>> > Subject: [PATCH 2/6] daemon: Missing #includes revealed by cross-compiling.
>>
>> Looks fine and obviously safe.
>> What symbols?
>
> The two problems fixed by this are that PATH_MAX requires <limits.h>
> (on Win32 anyhow), and that various str* and mem* functions were being
> used without including <string.h> (probably works because this is
> implicitly included from another header file).

Did you know that PATH_MAX may not be defined at all?
Or it may be defined to something outrageously large?
That's why coding style guidelines often suggest to avoid it altogether.




More information about the Libguestfs mailing list