[alsa-devel] [PATCH] topology: Include <linux/types.h> in API header file

Takashi Iwai tiwai at suse.de
Fri Nov 6 13:59:41 CET 2015


On Fri, 06 Nov 2015 13:39:36 +0100,
mengdong.lin at linux.intel.com wrote:
> 
> From: Mengdong Lin <mengdong.lin at linux.intel.com>
> 
> Include <linux/types.h> in the API header file topology.h
> 
> The struct snd_tplg_stream_caps_template has a member "formats"
> of type __le64. So <linux/types.h> is needed.

We shouldn't use __le64 for user-space API.  I couldn't find it in
include/topology.h.  Where is it used?

Of course, it's fine to use it for kernel ABI.  But then linux/types.h
is already included in local.h, so it shouldn't be a problem.


Takashi

> 
> Signed-off-by: Mengdong Lin <mengdong.lin at linux.intel.com>
> 
> diff --git a/include/topology.h b/include/topology.h
> index b631871..5ee67e2 100644
> --- a/include/topology.h
> +++ b/include/topology.h
> @@ -21,6 +21,8 @@
>  #ifndef __ALSA_TOPOLOGY_H
>  #define __ALSA_TOPOLOGY_H
>  
> +#include <linux/types.h>
> +
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> -- 
> 1.9.1
> 


More information about the Alsa-devel mailing list