[alsa-devel] Trouble building alsa-lib

Takashi Iwai tiwai at suse.de
Thu Feb 14 17:06:23 CET 2008


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 <sys/time.h>
 #include <sys/types.h>
+#include <sys/ioctl.h>
 #endif
 
 /*


More information about the Alsa-devel mailing list