]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: move ENODATA redefine to internal.h
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Thu, 7 Apr 2016 06:51:11 +0000 (09:51 +0300)
committerCole Robinson <crobinso@redhat.com>
Wed, 20 Apr 2016 13:11:48 +0000 (09:11 -0400)
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)

src/internal.h
src/util/viruuid.c

index 926e990c1b9c4ef48ae6db36af9e4bc01bdb4b4a..0dc34c755d63f44e76962bdaea6a62d09fea307e 100644 (file)
@@ -539,4 +539,8 @@ enum {
     EXIT_ENOENT = 127, /* Could not find program to exec */
 };
 
+# ifndef ENODATA
+#  define ENODATA EIO
+# endif
+
 #endif                          /* __VIR_INTERNAL_H__ */
index 615d419e034cd0444fc37a446e778249e1de9fc7..8dead44b8ffde368a85ea37d967e6c023ab256ae 100644 (file)
 
 VIR_LOG_INIT("util.uuid");
 
-#ifndef ENODATA
-# define ENODATA EIO
-#endif
-
 static unsigned char host_uuid[VIR_UUID_BUFLEN];
 
 static int