On Mon, 3 Mar 2008, Takashi Iwai wrote:

> At Sat, 1 Mar 2008 03:58:16 -0600 (CST),
> Stephen Stocker wrote:
>>
>>   Hi.
>>
>>   I'm running kernel 2.4.24-ck1, gcc 3.3.4. Trying to compile the
>>   alsa-lib-1.0.16, I get the following error.
>
> Does the patch below fix?
>
>
> Takashi
>
> diff -r 14ce0fc9a26d src/pcm/pcm_local.h
> --- a/src/pcm/pcm_local.h     Fri Feb 29 12:42:57 2008 +0100
> +++ b/src/pcm/pcm_local.h     Mon Mar 03 18:11:21 2008 +0100
> @@ -944,13 +944,17 @@ typedef union snd_tmp_double {
> /* get the current timestamp */
> static inline void gettimestamp(snd_htimestamp_t *tstamp, int monotonic)
> {
> +#ifdef HAVE_CLOCK_GETTIME
>       if (monotonic) {
>               clock_gettime(CLOCK_MONOTONIC, tstamp);
>       } else {
> +#else
>               struct timeval tv;
>
>               gettimeofday(&tv, 0);
>               tstamp->tv_sec = tv.tv_sec;
>               tstamp->tv_nsec = tv.tv_usec * 1000L;
> +#ifdef HAVE_CLOCK_GETTIME
>       }
> +#endif
> }
>

   Hi,
   I'm still getting an error, but slightly different after applying the 
patch. I'm not sure how to shorten it here without losing some vital 
message, so here's the complete error:

In file included from ../../include/aserver.h:22,
                  from control_shm.c:36:
../../src/pcm/pcm_local.h: In function `gettimestamp':
../../src/pcm/pcm_local.h:949: error: `CLOCK_MONOTONIC' undeclared (first use 
in this function)
../../src/pcm/pcm_local.h:949: error: (Each undeclared identifier is reported 
only once
../../src/pcm/pcm_local.h:949: error: for each function it appears in.)
In file included from ../../include/aserver.h:22,
                  from control_shm.c:36:
../../src/pcm/pcm_local.h:947:1: unterminated #else
control_shm.c: In function `snd_ctl_shm_action':
control_shm.c:52: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_action_fd':
control_shm.c:71: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_close':
control_shm.c:90: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_async':
control_shm.c:108: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_poll_descriptor':
control_shm.c:120: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_subscribe_events':
control_shm.c:132: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_card_info':
control_shm.c:141: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_elem_list':
control_shm.c:155: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_elem_info':
control_shm.c:177: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_elem_read':
control_shm.c:191: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_elem_write':
control_shm.c:205: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_elem_lock':
control_shm.c:219: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_elem_unlock':
control_shm.c:233: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_hwdep_next_device':
control_shm.c:247: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_hwdep_info':
control_shm.c:261: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_pcm_next_device':
control_shm.c:275: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_pcm_info':
control_shm.c:289: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_pcm_prefer_subdevice':
control_shm.c:303: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_rawmidi_next_device':
control_shm.c:316: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_rawmidi_info':
control_shm.c:330: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_rawmidi_prefer_subdevice':
control_shm.c:344: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_set_power_state':
control_shm.c:357: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_get_power_state':
control_shm.c:370: error: dereferencing pointer to incomplete type
control_shm.c: In function `snd_ctl_shm_read':
control_shm.c:389: error: dereferencing pointer to incomplete type
control_shm.c: In function `gettimestamp':
control_shm.c:468: warning: static declaration for `snd_ctl_shm_open' follows 
non-static
control_shm.c: In function `snd_ctl_shm_open':
control_shm.c:543: error: dereferencing pointer to incomplete type
control_shm.c:544: error: dereferencing pointer to incomplete type
control_shm.c:550: error: dereferencing pointer to incomplete type
control_shm.c: In function `gettimestamp':
control_shm.c:679: error: parse error at end of input
make[2]: *** [control_shm.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

---

   Thanks again for your help. :)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to