Package: yiff
Version: 2.14.5-2.2
Severity: important
Tags: patch

Hi,

currently your package FTBFS on GNU/kFreeBSD with the following error:
> gcc -c ymixer.c  -DALSA_RUN_CONFORM -DOSS -DOSS_BUFFRAG -DYSHM_SUPPORT 
> -D__USE_BSD -Wall -O6 -fomit-frame-pointer -funroll-loops -finline-functions 
> -ffast-math
> ymixer.c: In function 'GET_MIXER_NUM_BY_NAME':
> ymixer.c:102: error: 'SOUND_DEVICE_NAMES' undeclared (first use in this 
> function)
> ymixer.c:102: error: (Each undeclared identifier is reported only once
> ymixer.c:102: error: for each function it appears in.)
> ymixer.c:108: error: 'SOUND_MIXER_READ_DEVMASK' undeclared (first use in this 
> function)
> ymixer.c:108: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c:114: error: 'SOUND_MIXER_NRDEVICES' undeclared (first use in this 
> function)
> ymixer.c:114: warning: comparison between pointer and integer
> ymixer.c:122: warning: comparison between pointer and integer
> ymixer.c: In function 'YMixerSetBass':
> ymixer.c:161: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:161: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c:161: warning: implicit declaration of function 'MIXER_WRITE'
> ymixer.c: In function 'YMixerSetCD':
> ymixer.c:172: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:172: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetGainIn':
> ymixer.c:183: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:183: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetGainOut':
> ymixer.c:194: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:194: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetLine':
> ymixer.c:205: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:205: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetLine1':
> ymixer.c:216: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:216: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetLine2':
> ymixer.c:227: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:227: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetLine3':
> ymixer.c:238: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:238: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetMic':
> ymixer.c:249: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:249: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetMix':
> ymixer.c:260: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:260: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetPCM':
> ymixer.c:271: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:271: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetPCM2':
> ymixer.c:282: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:282: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetRec':
> ymixer.c:293: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:293: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetSpeaker':
> ymixer.c:304: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:304: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetSynth':
> ymixer.c:315: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:315: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetTreble':
> ymixer.c:326: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:326: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetVolume':
> ymixer.c:337: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:337: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetDigital1':
> ymixer.c:348: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:348: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetDigital2':
> ymixer.c:359: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:359: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetDigital3':
> ymixer.c:370: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:370: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetPhoneIn':
> ymixer.c:381: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:381: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetPhoneOut':
> ymixer.c:392: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:392: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetVideo':
> ymixer.c:403: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:403: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetRadio':
> ymixer.c:414: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:414: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerSetMonitor':
> ymixer.c:425: error: 'SOUND_MIXER_READ_STEREODEVS' undeclared (first use in 
> this function)
> ymixer.c:425: warning: passing argument 2 of 'ioctl' makes integer from 
> pointer without a cast
> ymixer.c: In function 'YMixerGetBass':
> ymixer.c:452: warning: implicit declaration of function 'MIXER_READ'
> make[1]: *** [ymixer.o] Error 1


Full build logs are available at
<http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=yiff>.

Please find attached a patch to fix this. The change from linux/ to sys/
is motivated by the fact that sys/soundcard.h includes linux/soundcard.h
on Linux, so it is harmless to do so, and makes it more portable. If you
consider it too intrusive, feel free to use another #elif instead.

Cheers,

-- 
Cyril Brulebois
--- yiff-2.14.5/yiff/ymixer.c	2007-03-21 08:32:00.652899000 +0100
+++ yiff-2.14.5/yiff/ymixer.c	2007-03-21 08:32:20.000000000 +0100
@@ -5,8 +5,8 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 
-#if defined(__linux__)
-# include <linux/soundcard.h>
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
+# include <sys/soundcard.h>
 #elif defined(__FreeBSD__)
 # include <machine/soundcard.h>
 #endif
--- yiff-2.14.5/yiff/ysound.c	2007-03-21 08:37:01.619199000 +0100
+++ yiff-2.14.5/yiff/ysound.c	2007-03-21 08:37:16.000000000 +0100
@@ -7,8 +7,8 @@
 #include <fcntl.h>
 #include <unistd.h>
 
-#if defined(__linux__)
-# include <linux/soundcard.h>
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
+# include <sys/soundcard.h>
 #elif defined(__FreeBSD__)
 # include <machine/soundcard.h>
 #endif

Reply via email to