define ENOTSUP the same that the other errors

aliguori: ENOTSUP is not 4096 universally, only on OpenBSD

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Juan Quintela 2009-07-27 16:13:22 +02:00 committed by Anthony Liguori
parent 5647eb7475
commit 2880bc32b8
2 changed files with 3 additions and 7 deletions

5
configure vendored
View File

@ -265,7 +265,6 @@ oss_lib="-lossaudio"
;; ;;
OpenBSD) OpenBSD)
bsd="yes" bsd="yes"
openbsd="yes"
audio_drv_list="oss" audio_drv_list="oss"
audio_possible_drivers="oss sdl esd" audio_possible_drivers="oss sdl esd"
oss_lib="-lossaudio" oss_lib="-lossaudio"
@ -1544,10 +1543,6 @@ EOF
fi fi
fi fi
if [ "$openbsd" = "yes" ] ; then
echo "#define ENOTSUP 4096" >> $config_host_h
fi
if test "$darwin" = "yes" ; then if test "$darwin" = "yes" ; then
echo "CONFIG_DARWIN=y" >> $config_host_mak echo "CONFIG_DARWIN=y" >> $config_host_mak
echo "#define CONFIG_DARWIN 1" >> $config_host_h echo "#define CONFIG_DARWIN 1" >> $config_host_h

View File

@ -38,6 +38,9 @@
#ifndef ENOMEDIUM #ifndef ENOMEDIUM
#define ENOMEDIUM ENODEV #define ENOMEDIUM ENODEV
#endif #endif
#if !defined(ENOTSUP) && defined(__OpenBSD__)
#define ENOTSUP 4096
#endif
#ifndef CONFIG_IOVEC #ifndef CONFIG_IOVEC
#define CONFIG_IOVEC #define CONFIG_IOVEC
@ -52,11 +55,9 @@ struct iovec {
#ifdef _WIN32 #ifdef _WIN32
#define fsync _commit #define fsync _commit
#define lseek _lseeki64 #define lseek _lseeki64
#define ENOTSUP 4096
extern int qemu_ftruncate64(int, int64_t); extern int qemu_ftruncate64(int, int64_t);
#define ftruncate qemu_ftruncate64 #define ftruncate qemu_ftruncate64
static inline char *realpath(const char *path, char *resolved_path) static inline char *realpath(const char *path, char *resolved_path)
{ {
_fullpath(resolved_path, path, _MAX_PATH); _fullpath(resolved_path, path, _MAX_PATH);