--- a/src/s_audio_oss.c
+++ b/src/s_audio_oss.c
@@ -9,6 +9,13 @@
 # include <sys/soundcard.h>
 #else
 # include <linux/soundcard.h>
+#endif
+
+#ifndef SNDCTL_DSP_GETISPACE
+#define SNDCTL_DSP_GETISPACE SOUND_PCM_GETISPACE
+#endif
+#ifndef SNDCTL_DSP_GETOSPACE
+#define SNDCTL_DSP_GETOSPACE SOUND_PCM_GETOSPACE
 #endif
 
 #include "m_pd.h"
@@ -202,7 +209,7 @@
         out.  */
 
         int defect;
-        if (ioctl(fd, SOUND_PCM_GETOSPACE,&ainfo) < 0)
+        if (ioctl(fd, SNDCTL_DSP_GETOSPACE,&ainfo) < 0)
            fprintf(stderr,"OSS: ioctl on output device failed");
         dev->d_bufsize = ainfo.bytes;
 
@@ -514,14 +521,14 @@
     audio_buf_info ainfo;
     for (dev=0; dev < linux_noutdevs; dev++)
     {
-        if (ioctl(linux_dacs[dev].d_fd, SOUND_PCM_GETOSPACE, &ainfo) < 0)
+        if (ioctl(linux_dacs[dev].d_fd, SNDCTL_DSP_GETOSPACE, &ainfo) < 0)
            fprintf(stderr,"OSS: ioctl on output device %d failed",dev);
         linux_dacs[dev].d_space = ainfo.bytes;
     }
 
     for (dev = 0; dev < linux_nindevs; dev++)
     {
-        if (ioctl(linux_adcs[dev].d_fd, SOUND_PCM_GETISPACE,&ainfo) < 0)
+        if (ioctl(linux_adcs[dev].d_fd, SNDCTL_DSP_GETISPACE,&ainfo) < 0)
             fprintf(stderr, "OSS: ioctl on input device %d, fd %d failed",
                 dev, linux_adcs[dev].d_fd);
         linux_adcs[dev].d_space = ainfo.bytes;
@@ -569,7 +576,7 @@
             linux_adcs_read(linux_adcs[dev].d_fd, buf, 
                 OSS_XFERSIZE(linux_adcs[dev].d_nchannels,
                     linux_adcs[dev].d_bytespersamp));
-            if (ioctl(linux_adcs[dev].d_fd, SOUND_PCM_GETISPACE, &ainfo) < 0)
+            if (ioctl(linux_adcs[dev].d_fd, SNDCTL_DSP_GETISPACE, &ainfo) < 0)
             {
                 fprintf(stderr, "OSS: ioctl on input device %d, fd %d failed",
                     dev, linux_adcs[dev].d_fd);
@@ -598,7 +605,7 @@
             linux_dacs_write(linux_dacs[dev].d_fd, buf,
                 OSS_XFERSIZE(linux_dacs[dev].d_nchannels,
                     linux_dacs[dev].d_bytespersamp));
-            if (ioctl(linux_dacs[dev].d_fd, SOUND_PCM_GETOSPACE, &ainfo) < 0)
+            if (ioctl(linux_dacs[dev].d_fd, SNDCTL_DSP_GETOSPACE, &ainfo) < 0)
             {
                 fprintf(stderr, "OSS: ioctl on output device %d, fd %d failed",
                     dev, linux_dacs[dev].d_fd);