[alsa-devel] [PATCH alsa-lib] src/rawmidi/rawmidi_symbols.c: use rawmidi_virt only when available

Takashi Iwai tiwai at suse.de
Sat Aug 12 23:41:27 CEST 2017


On Fri, 11 Aug 2017 23:24:03 +0200,
Thomas Petazzoni wrote:
> 
> src/rawmidi/Makefile.am only brings rawmidi_virt.c into the build when
> BUILD_SEQ is defined (i.e when --enable-seq is passed). However,
> rawmidi_symbols.c unconditionally refers to _snd_module_rawmidi_virt,
> defined in rawmidi_virt.c.
> 
> This causes a link failure when BUILD_SEQ is disabled. For example
> when linking ffmpeg against alsa-lib:
> 
> /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libasound.a(pcm_dmix.o): In function `snd_pcm_dmix_sync_ptr':
> pcm_dmix.c:(.text+0x83c): warning:
> /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libasound.a(rawmidi_symbols.o):(.data+0x4): undefined reference to `_snd_module_rawmidi_virt'
> collect2: error: ld returned 1 exit status
> 
> To fix this, we make sure that rawmidi_symbols.c only uses
> _snd_module_rawmidi_virt when available.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>

Applied, thanks.


Takashi


More information about the Alsa-devel mailing list