Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 426254

Summary: media-plugins/alsa-plugins-1.0.25-r1 - pcm_usb_stream.c:222:73: error: 'MREMAP_MAYMOVE' undeclared (first use in this function)
Product: Gentoo Linux Reporter: devsk <funtoos>
Component: Current packagesAssignee: Gentoo ALSA team <alsa-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: dawnstyle
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 424737    
Attachments: Define _GNU_SOURCE before including the features.h to pick up __USE_GNU and dependent macro definitions

Description devsk 2012-07-12 04:31:42 UTC
/bin/sh ../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..    -Wall -g -I/usr/include/alsa   -O2 -march=native -fforce-addr -fomit-frame-pointer -pipe -ftracer -DNDEBUG -c -o pcm_usb_stream.lo pcm_usb_stream.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -I/usr/include/alsa -O2 -march=native -fforce-addr -fomit-frame-pointer -pipe -ftracer -DNDEBUG -c pcm_usb_stream.c  -fPIC -DPIC -o .libs/pcm_usb_stream.o
pcm_usb_stream.c: In function 'snd_pcm_us_prepare':
pcm_usb_stream.c:222:3: warning: implicit declaration of function 'mremap' [-Wimplicit-function-declaration]
pcm_usb_stream.c:222:73: error: 'MREMAP_MAYMOVE' undeclared (first use in this function)
pcm_usb_stream.c:222:73: note: each undeclared identifier is reported only once for each function it appears in
gmake: *** [pcm_usb_stream.lo] Error 1

The trivial fix is:

--- usb_stream/pcm_usb_stream.c.orig    2012-07-12 04:26:03.439511318 +0000
+++ usb_stream/pcm_usb_stream.c 2012-07-12 04:26:09.387436959 +0000
@@ -18,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <byteswap.h>
 #define _GNU_SOURCE
+#include <byteswap.h>
 #include <sys/mman.h>
 #include <sys/shm.h>
 #include <sys/ioctl.h>

Reproducible: Always
Comment 1 devsk 2012-07-12 04:32:45 UTC
Created attachment 317970 [details, diff]
Define _GNU_SOURCE before including the features.h to pick up __USE_GNU and dependent macro definitions
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-07-25 14:10:33 UTC
*** Bug 427256 has been marked as a duplicate of this bug. ***
Comment 3 SpanKY gentoo-dev 2012-08-18 02:57:52 UTC
should be all set now in the tree; thanks for the report!

Commit message: Add fix from upstream for building with glibc-2.16
http://sources.gentoo.org/media-plugins/alsa-plugins/alsa-plugins-1.0.25-r1.ebuild?r1=1.10&r2=1.11
http://sources.gentoo.org/media-plugins/alsa-plugins/files/alsa-plugins-1.0.25-glibc-2.16.patch?rev=1.1