All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix build if OSS_GETVERSION is not defined
@ 2010-01-07 22:23 Juergen Lock
  2010-01-08  8:27 ` malc
  0 siblings, 1 reply; 7+ messages in thread
From: Juergen Lock @ 2010-01-07 22:23 UTC (permalink / raw)
  To: qemu-devel

In this case it was missing on FreeBSD <= 6.x  (Which also doesn't have
SNDCTL_DSP_POLICY yet so the version doesn't get used anyway.)

 Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>

--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -240,7 +240,7 @@ static int oss_open (int in, struct oss_
                      struct oss_params *obt, int *pfd)
 {
     int fd;
-    int version;
+    int version = 0;
     int oflags = conf.exclusive ? O_EXCL : 0;
     audio_buf_info abinfo;
     int fmt, freq, nchannels;
@@ -281,10 +281,12 @@ static int oss_open (int in, struct oss_
         goto err;
     }
 
+#ifdef OSS_GETVERSION
     if (ioctl (fd, OSS_GETVERSION, &version)) {
         oss_logerr2 (errno, typ, "Failed to get OSS version\n");
         version = 0;
     }
+#endif
 
     if (conf.debug) {
         dolog ("OSS version = %#x\n", version);

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-09 22:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-07 22:23 [Qemu-devel] [PATCH] Fix build if OSS_GETVERSION is not defined Juergen Lock
2010-01-08  8:27 ` malc
2010-01-08 19:46   ` Juergen Lock
2010-01-08 21:33     ` malc
2010-01-09 13:45       ` Juergen Lock
2010-01-09 14:03         ` Andreas Färber
2010-01-09 21:08           ` Juergen Lock

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.