$ cat >a.c #include <sys/soundcard.h> #include <sys/ioctl.h> #include <fcntl.h> #include <err.h> int main() { int fd = open("/dev/dsp", O_RDWR, 0); audio_errinfo ei; if (ioctl(fd, SNDCTL_DSP_GETERROR, &ei) < 0) err(1, "SNDCTL_DSP_GETERROR"); return 0; } $ cc -o foo a.c $ cc -m32 -o bar a.c $ ./foo $ ./bar bar: SNDCTL_DSP_GETERROR: Invalid argument
The issue is not limited to DSP_GETERROR only; the sys/dev/sound code lacks COMPAT32 shims at all. The task to add them is not technically complicated but requires patience and understanding what to test.