]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Check _POSIX_SOURCE for timeval definition
authorTakashi Iwai <tiwai@suse.de>
Fri, 9 Mar 2007 14:30:38 +0000 (15:30 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Mar 2007 14:30:38 +0000 (15:30 +0100)
Check _POSIX_SOURCE for struct timeval definition.
In rare cases, _POSIX_C_SOURCE isn't defined but only _POSIX_SOURCE
is set, and it results in the confliction of timeval definition.

include/global.h

index 4889eae5973825d7d7adddbe0d71a329e17afe83..4d5fb28d68c31e19ef479060fa3fafa6619e14a6 100644 (file)
@@ -130,7 +130,7 @@ int snd_shm_area_destroy(struct snd_shm_area *area);
 
 int snd_user_file(const char *file, char **result);
 
-#ifndef _POSIX_C_SOURCE
+#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
 struct timeval {
        time_t          tv_sec;         /* seconds */
        long            tv_usec;        /* microseconds */