OSDN Git Service

topology: Support configuring physical DAIs by C API
[android-x86/external-alsa-lib.git] / include / global.h
index f388e4b..16a26dc 100644 (file)
@@ -102,6 +102,9 @@ void *snd_dlsym(void *handle, const char *name, const char *version);
 int snd_dlclose(void *handle);
 
 
+/** \brief alloca helper macro. */
+#define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
+
 /**
  * \brief Internal structure for an async notification client handler.
  *
@@ -130,6 +133,7 @@ int snd_shm_area_destroy(struct snd_shm_area *area);
 
 int snd_user_file(const char *file, char **result);
 
+#ifdef __GLIBC__
 #if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
 struct timeval {
        time_t          tv_sec;         /* seconds */
@@ -141,6 +145,7 @@ struct timespec {
        long            tv_nsec;        /* nanoseconds */
 };
 #endif
+#endif
 
 /** Timestamp */
 typedef struct timeval snd_timestamp_t;