From: Roman Bogorodskiy Date: Thu, 7 Apr 2016 06:51:11 +0000 (+0300) Subject: util: move ENODATA redefine to internal.h X-Git-Tag: v1.3.3.1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7497777b501e62ed3c4c85cc929685ab6223240b;p=thirdparty%2Flibvirt.git util: move ENODATA redefine to internal.h FreeBSD lacks ENODATA, and viruuid.c redefines it to EIO, but it's not actually using it. On the other hand, we have virrandom.c that's using ENODATA. So make this re-definition common by moving it to internal.h, so all the current and possible future users don't need to care about that. (cherry picked from commit edc028d122a45b09988dae6d93510adbd9f5c3e4) --- diff --git a/src/internal.h b/src/internal.h index 926e990c1b..0dc34c755d 100644 --- a/src/internal.h +++ b/src/internal.h @@ -539,4 +539,8 @@ enum { EXIT_ENOENT = 127, /* Could not find program to exec */ }; +# ifndef ENODATA +# define ENODATA EIO +# endif + #endif /* __VIR_INTERNAL_H__ */ diff --git a/src/util/viruuid.c b/src/util/viruuid.c index 615d419e03..8dead44b8f 100644 --- a/src/util/viruuid.c +++ b/src/util/viruuid.c @@ -46,10 +46,6 @@ VIR_LOG_INIT("util.uuid"); -#ifndef ENODATA -# define ENODATA EIO -#endif - static unsigned char host_uuid[VIR_UUID_BUFLEN]; static int