* [PATCH] ALSA: uapi: #include <time.h> in asound.h
@ 2019-03-29 22:48 Daniel Mentz
2019-04-01 10:33 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Mentz @ 2019-03-29 22:48 UTC (permalink / raw)
To: perex, tiwai, alsa-devel, etam; +Cc: Daniel Mentz
The uapi header asound.h defines types based on struct timespec. We need
to #include <time.h> to get access to the definition of this struct.
Previously, we encountered the following error message when building
applications with a clang/bionic toolchain:
kernel-headers/sound/asound.h:350:19: error: field has incomplete type 'struct timespec'
struct timespec trigger_tstamp;
^
The absence of the time.h #include statement does not cause build errors
with glibc, because its version of stdlib.h indirectly includes time.h.
Signed-off-by: Daniel Mentz <danielmentz@google.com>
---
include/uapi/sound/asound.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 404d4b9ffe76..df1153cea0b7 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -32,6 +32,7 @@
#ifndef __KERNEL__
#include <stdlib.h>
+#include <time.h>
#endif
/*
--
2.21.0.392.gf8f6787159e-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: uapi: #include <time.h> in asound.h
2019-03-29 22:48 [PATCH] ALSA: uapi: #include <time.h> in asound.h Daniel Mentz
@ 2019-04-01 10:33 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-04-01 10:33 UTC (permalink / raw)
To: Daniel Mentz; +Cc: etam, alsa-devel
On Fri, 29 Mar 2019 23:48:54 +0100,
Daniel Mentz wrote:
>
> The uapi header asound.h defines types based on struct timespec. We need
> to #include <time.h> to get access to the definition of this struct.
>
> Previously, we encountered the following error message when building
> applications with a clang/bionic toolchain:
>
> kernel-headers/sound/asound.h:350:19: error: field has incomplete type 'struct timespec'
> struct timespec trigger_tstamp;
> ^
>
> The absence of the time.h #include statement does not cause build errors
> with glibc, because its version of stdlib.h indirectly includes time.h.
>
> Signed-off-by: Daniel Mentz <danielmentz@google.com>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-01 10:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 22:48 [PATCH] ALSA: uapi: #include <time.h> in asound.h Daniel Mentz
2019-04-01 10:33 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.