From patchwork Thu Jan 7 22:23:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Lock X-Patchwork-Id: 42483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DFF44B6EF7 for ; Fri, 8 Jan 2010 09:26:01 +1100 (EST) Received: from localhost ([127.0.0.1]:50618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NT0nl-0002ea-FR for incoming@patchwork.ozlabs.org; Thu, 07 Jan 2010 17:25:57 -0500 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: by smtp.kn-bremen.de (Postfix, from userid 10) id BA5111E00761; Thu, 7 Jan 2010 23:25:08 +0100 (CET) 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 To: qemu-devel@nongnu.org Message-ID: <20100107222343.GA90709@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH] Fix build if OSS_GETVERSION is not defined X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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);