Revision e726fe7d

b/audio/ossaudio.c
240 240
                     struct oss_params *obt, int *pfd)
241 241
{
242 242
    int fd;
243
#ifdef OSS_GETVERSION
243 244
    int version;
245
#endif
244 246
    int oflags = conf.exclusive ? O_EXCL : 0;
245 247
    audio_buf_info abinfo;
246 248
    int fmt, freq, nchannels;
......
281 283
        goto err;
282 284
    }
283 285

  
286
#ifdef OSS_GETVERSION
284 287
    if (ioctl (fd, OSS_GETVERSION, &version)) {
285 288
        oss_logerr2 (errno, typ, "Failed to get OSS version\n");
286 289
        version = 0;
......
289 292
    if (conf.debug) {
290 293
        dolog ("OSS version = %#x\n", version);
291 294
    }
295
#endif
292 296

  
293 297
#ifdef SNDCTL_DSP_POLICY
294
    if (conf.policy >= 0 && version >= 0x040000) {
298
    if (conf.policy >= 0
299
#ifdef OSS_GETVERSION
300
        && version >= 0x040000
301
#else
302
        0
303
#endif
304
        )
305
    {
295 306
        int policy = conf.policy;
296 307
        if (ioctl (fd, SNDCTL_DSP_POLICY, &policy)) {
297 308
            oss_logerr2 (errno, typ, "Failed to set timing policy to %d\n",

Also available in: Unified diff