From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NT0n3-0002NP-IW for qemu-devel@nongnu.org; Thu, 07 Jan 2010 17:25:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NT0n2-0002M9-MZ for qemu-devel@nongnu.org; Thu, 07 Jan 2010 17:25:13 -0500 Received: from [199.232.76.173] (port=48025 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NT0n2-0002M3-H2 for qemu-devel@nongnu.org; Thu, 07 Jan 2010 17:25:12 -0500 Received: from gelbbaer.kn-bremen.de ([78.46.108.116]:48747 helo=smtp.kn-bremen.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NT0n1-0002KI-VN for qemu-devel@nongnu.org; Thu, 07 Jan 2010 17:25:12 -0500 Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.3/8.14.3) with ESMTP id o07MNixV090924 for ; Thu, 7 Jan 2010 23:23:44 +0100 (CET) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.3/8.14.3/Submit) id o07MNh9A090923 for qemu-devel@nongnu.org; Thu, 7 Jan 2010 23:23:43 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Thu, 7 Jan 2010 23:23:43 +0100 Message-ID: <20100107222343.GA90709@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] Fix build if OSS_GETVERSION is not defined List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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);