Commit 2880bc32b84831032d561f850b13b9f4f03d910e

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent 5647eb74

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>
Showing 2 changed files with 3 additions and 7 deletions
configure
@@ -265,7 +265,6 @@ oss_lib=&quot;-lossaudio&quot; @@ -265,7 +265,6 @@ oss_lib=&quot;-lossaudio&quot;
265 ;; 265 ;;
266 OpenBSD) 266 OpenBSD)
267 bsd="yes" 267 bsd="yes"
268 -openbsd="yes"  
269 audio_drv_list="oss" 268 audio_drv_list="oss"
270 audio_possible_drivers="oss sdl esd" 269 audio_possible_drivers="oss sdl esd"
271 oss_lib="-lossaudio" 270 oss_lib="-lossaudio"
@@ -1544,10 +1543,6 @@ EOF @@ -1544,10 +1543,6 @@ EOF
1544 fi 1543 fi
1545 fi 1544 fi
1546 1545
1547 -if [ "$openbsd" = "yes" ] ; then  
1548 - echo "#define ENOTSUP 4096" >> $config_host_h  
1549 -fi  
1550 -  
1551 if test "$darwin" = "yes" ; then 1546 if test "$darwin" = "yes" ; then
1552 echo "CONFIG_DARWIN=y" >> $config_host_mak 1547 echo "CONFIG_DARWIN=y" >> $config_host_mak
1553 echo "#define CONFIG_DARWIN 1" >> $config_host_h 1548 echo "#define CONFIG_DARWIN 1" >> $config_host_h
qemu-common.h
@@ -38,6 +38,9 @@ @@ -38,6 +38,9 @@
38 #ifndef ENOMEDIUM 38 #ifndef ENOMEDIUM
39 #define ENOMEDIUM ENODEV 39 #define ENOMEDIUM ENODEV
40 #endif 40 #endif
  41 +#if !defined(ENOTSUP) && defined(__OpenBSD__)
  42 +#define ENOTSUP 4096
  43 +#endif
41 44
42 #ifndef CONFIG_IOVEC 45 #ifndef CONFIG_IOVEC
43 #define CONFIG_IOVEC 46 #define CONFIG_IOVEC
@@ -52,11 +55,9 @@ struct iovec { @@ -52,11 +55,9 @@ struct iovec {
52 #ifdef _WIN32 55 #ifdef _WIN32
53 #define fsync _commit 56 #define fsync _commit
54 #define lseek _lseeki64 57 #define lseek _lseeki64
55 -#define ENOTSUP 4096  
56 extern int qemu_ftruncate64(int, int64_t); 58 extern int qemu_ftruncate64(int, int64_t);
57 #define ftruncate qemu_ftruncate64 59 #define ftruncate qemu_ftruncate64
58 60
59 -  
60 static inline char *realpath(const char *path, char *resolved_path) 61 static inline char *realpath(const char *path, char *resolved_path)
61 { 62 {
62 _fullpath(resolved_path, path, _MAX_PATH); 63 _fullpath(resolved_path, path, _MAX_PATH);