[libvirt] Re: [PATCH] portability: don't include <endian.h>

Jim Meyering jim at meyering.net
Wed Dec 17 18:12:46 UTC 2008

John Levon <john.levon at Sun.COM> wrote:
> On Wed, Dec 17, 2008 at 01:55:59PM +0100, Jim Meyering wrote:
>> Adding the inclusions of <string.h> and <mntent.h> look fine,
> They were just moved.
>> but rather than testing for endian.h, it seems we can do away with
>> it altogether.  Even the __LITTLE_ENDIAN and __BIG_ENDIAN
>> constants aren't really required.  Rather, all you need is
> Fine by me, if you prefer it this way.

Of course.
Avoiding an #ifdef like that is worth an iteration.

I've committed the patch I proposed, with one change:
also remove the unnecessary inclusion of <byteswap.h>.

More information about the libvir-list mailing list