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

Bug 229603

Summary: media-sound/lash-0.5.4 fails to build (glibc-2.8) (patch)
Product: Gentoo Linux Reporter: Olivier Huber <oli.huber>
Component: Current packagesAssignee: Professional Audio Applications Maintainers <proaudio>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 2007.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 225459    
Attachments: patch proposal

Description Olivier Huber 2008-06-26 13:59:09 UTC
In file included from ../lash/list.h:37,
                 from socket.c:36:
../lash/xmalloc.h: In function 'lash_strdup':
../lash/xmalloc.h:51: warning: incompatible implicit declaration of built-in function 'strdup'
socket.c: In function 'lash_lookup_peer_name':
socket.c:266: error: 'NI_MAXHOST' undeclared (first use in this function)
socket.c:266: error: (Each undeclared identifier is reported only once
socket.c:266: error: for each function it appears in.)
socket.c: In function 'lash_lookup_peer_port':
socket.c:279: error: 'NI_MAXSERV' undeclared (first use in this function)

This seems to be a little bit odd : in lash/xmalloc.h, _GNU_SOURCE is defined by : 

#ifdef LASH_BUILD
#define _GNU_SOURCE
#include "config.h"
#endif /* LASH_BUILD */

Do everything should be fine : socket.c includes lash/list.h which includes lash/xmalloc.h. But it fails ...
Comment 1 Olivier Huber 2008-06-26 14:01:24 UTC
Created attachment 158509 [details, diff]
patch proposal

I just copy/past code from lash/xmalloc.h in socket.c and it works.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-26 16:30:12 UTC
it should just define _GNU_SOURCE over all the sources I think...
Comment 3 Alexis Ballier gentoo-dev 2008-08-07 17:07:56 UTC
well... I don't like the current situation, so I applied your patch anyway. Thanks!