Does anyone know why on 64-bit NetBSD sparc64 the following code works: ioctl(fd, SNDCTL_DSP_CHANNELS, &channels); but the following code returns -1 from ioctl unsigned long dsp_ch = SNDCTL_DSP_CHANNELS; ioctl(fd, dsp_ch, &channels) /usr/include/soundcard.h has: #define SNDCTL_DSP_CHANNELS _IOWR('P', 6, int)