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)
This commit is contained in:
Roman Bogorodskiy 2016-04-07 09:51:11 +03:00 committed by Cole Robinson
parent fd0cb97085
commit 7497777b50
2 changed files with 4 additions and 4 deletions

View 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__ */

View File

@ -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