Skip to content

Commit b5bdbb6

Browse files
danielmentzgoogletiwai
authored andcommitted
ALSA: uapi: #include <time.h> in asound.h
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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent ea5c7eb commit b5bdbb6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎include/uapi/sound/asound.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
#ifndef __KERNEL__
3434
#include <stdlib.h>
35+
#include <time.h>
3536
#endif
3637

3738
/*

0 commit comments

Comments
 (0)