[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Fix build if OSS_GETVERSION is not defined
From: |
Juergen Lock |
Subject: |
[Qemu-devel] [PATCH] Fix build if OSS_GETVERSION is not defined |
Date: |
Thu, 7 Jan 2010 23:23:43 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
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 <address@hidden>
--- 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);
- [Qemu-devel] [PATCH] Fix build if OSS_GETVERSION is not defined,
Juergen Lock <=