Message ID | 20201214163623.2127-18-bouyer@netbsd.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | NetBSD fixes | expand |
There's already a patch with the same subject in the series. I would recommend to be a bit more specific with the fixes, specally if there's no log message. This for example would better be: tools/libxl: fix uuid build on NetBSD On Mon, Dec 14, 2020 at 05:36:16PM +0100, Manuel Bouyer wrote: > --- > tools/libs/light/libxl_uuid.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/libs/light/libxl_uuid.c b/tools/libs/light/libxl_uuid.c > index dadb79bad8..a8ee5f253e 100644 > --- a/tools/libs/light/libxl_uuid.c > +++ b/tools/libs/light/libxl_uuid.c > @@ -82,7 +82,7 @@ void libxl_uuid_generate(libxl_uuid *uuid) > uuid_enc_be(uuid->uuid, &nat_uuid); > } > > -#ifdef __FreeBSD__ > +#if defined(__FreeBSD__) || defined(__NetBSD__) > int libxl_uuid_from_string(libxl_uuid *uuid, const char *in) > { > uint32_t status; > @@ -120,7 +120,7 @@ void libxl_uuid_clear(libxl_uuid *uuid) > memset(&uuid->uuid, 0, sizeof(uuid->uuid)); > } > > -#ifdef __FreeBSD__ > +#if defined(__FreeBSD__) || defined(__NetBSD__) There's no need to add NetBSD here, just remove the #ifdef altogether and the content of the #else branch, since this section is already only for FreeBSD and NetBSD (the #else variant was only used by NetBSD, see the #elif defined(__FreeBSD__) || defined(__NetBSD__) up on the file). Thanks, Roger.
diff --git a/tools/libs/light/libxl_uuid.c b/tools/libs/light/libxl_uuid.c index dadb79bad8..a8ee5f253e 100644 --- a/tools/libs/light/libxl_uuid.c +++ b/tools/libs/light/libxl_uuid.c @@ -82,7 +82,7 @@ void libxl_uuid_generate(libxl_uuid *uuid) uuid_enc_be(uuid->uuid, &nat_uuid); } -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__NetBSD__) int libxl_uuid_from_string(libxl_uuid *uuid, const char *in) { uint32_t status; @@ -120,7 +120,7 @@ void libxl_uuid_clear(libxl_uuid *uuid) memset(&uuid->uuid, 0, sizeof(uuid->uuid)); } -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__NetBSD__) int libxl_uuid_compare(const libxl_uuid *uuid1, const libxl_uuid *uuid2) { uuid_t nat_uuid1, nat_uuid2;