From: Takashi Iwai Subject: Re: Trouble building alsa-lib Date: Thu, 14 Feb 2008 17:06:23 +0100 Message-ID: References: <47B465D3.6040400@Gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 5E2F924581 for ; Thu, 14 Feb 2008 17:06:23 +0100 (CET) In-Reply-To: <47B465D3.6040400@Gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Linux Mercedes Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 14 Feb 2008 10:01:24 -0600, Linux Mercedes wrote: > > Hi all, > > I'm trying to build alsa from source. I'm guessing (I was not able to > find any instructions on how to build alsa) that I build alsa-lib > first. I'm compiling it with gcc 4.2.1. However, when I build it, I > get the following errors: > > In file included from ../../include/local.h:105, > from control_local.h:22, > from cards.c:35: > ../../include/sound/asound.h:148: warning: implicit declaration of > function '_IO > R' (snip) Does the patch below fix the problem? > In file included from ../../include/local.h:109, > from control_local.h:22, > from cards.c:35: > ../../include/global.h:137: error: redefinition of 'struct timeval' > ../../include/global.h:142: error: redefinition of 'struct timespec' Hm, try to pass -D_POSIX_C_SOURCE. These definitions are provided for non-POSIX compilers, and the header checks via ifdef. Takashi --- diff -r 53445ebeac04 include/sound/asound.h --- a/include/sound/asound.h Mon Feb 11 14:19:32 2008 +0100 +++ b/include/sound/asound.h Thu Feb 14 17:07:59 2008 +0100 @@ -59,6 +59,7 @@ #ifndef __KERNEL__ #include #include +#include #endif /*