All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Lock <nox@jelal.kn-bremen.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix build if OSS_GETVERSION is not defined
Date: Thu, 7 Jan 2010 23:23:43 +0100	[thread overview]
Message-ID: <20100107222343.GA90709@triton8.kn-bremen.de> (raw)

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);

             reply	other threads:[~2010-01-07 22:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 22:23 Juergen Lock [this message]
2010-01-08  8:27 ` [Qemu-devel] [PATCH] Fix build if OSS_GETVERSION is not defined 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100107222343.GA90709@triton8.kn-bremen.de \
    --to=nox@jelal.kn-bremen.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.