Fix the build with old glibc

The old systems don't support CLOCK_MONOTONIC although clock_gettime() API
itself exists.  This causes compile errors.
This commit is contained in:
Takashi Iwai 2008-03-07 14:35:25 +01:00
parent 12944a024f
commit 91726ddf83
3 changed files with 6 additions and 2 deletions

View file

@ -994,7 +994,7 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name,
if (SNDRV_PROTOCOL_INCOMPATIBLE(ver, SNDRV_PCM_VERSION_MAX))
return -SND_ERROR_INCOMPATIBLE_VERSION;
#ifdef HAVE_CLOCK_GETTIME
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
if (SNDRV_PROTOCOL_VERSION(2, 0, 9) <= ver) {
struct timespec timespec;
if (clock_gettime(CLOCK_MONOTONIC, &timespec) == 0) {