FreeBSD lacks ENODATA, and viruuid.c redefines it to EIO. However,
now we have virrandom.c that's using ENODATA also, so move this
re-definition to a common place, virutil.h, so it could fix things for
both consumers.
---
src/util/virutil.h | 4 ++++
src/util/viruuid.c | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/util/virutil.h b/src/util/virutil.h
index b121de0..36ed186 100644
--- a/src/util/virutil.h
+++ b/src/util/virutil.h
@@ -36,6 +36,10 @@
# define MAX(a, b) ((a) > (b) ? (a) : (b))
# endif
+# ifndef ENODATA
+# define ENODATA EIO
+# endif
+
int virSetBlocking(int fd, bool blocking) ATTRIBUTE_RETURN_CHECK;
int virSetNonBlock(int fd) ATTRIBUTE_RETURN_CHECK;
diff --git a/src/util/viruuid.c b/src/util/viruuid.c
index 1fcc954..16e57db 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
--
2.7.4