]> xenbits.xensource.com Git - 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)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Fri, 8 Apr 2016 07:20:10 +0000 (10:20 +0300)
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.

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

index db26fb077ce32abc102fadfe2198f51240883e67..9ebaf3c5a89339d0840283c24cd02a24c2378575 100644 (file)
@@ -517,4 +517,8 @@ enum {
     EXIT_ENOENT = 127, /* Could not find program to exec */
 };
 
+# ifndef ENODATA
+#  define ENODATA EIO
+# endif
+
 #endif                          /* __VIR_INTERNAL_H__ */
index 1fcc95405b5b1fa7fe535762d629f5e7bb8bd7d3..16e57dba2bc77bf584a45aa602af1a6f997a24c0 100644 (file)
 
 VIR_LOG_INIT("util.uuid");
 
-#ifndef ENODATA
-# define ENODATA EIO
-#endif
-
 static unsigned char host_uuid[VIR_UUID_BUFLEN];
 
 static int