mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
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:
parent
12944a024f
commit
91726ddf83
3 changed files with 6 additions and 2 deletions
|
|
@ -469,7 +469,7 @@ int snd_pcm_file_open(snd_pcm_t **pcmp, const char *name,
|
|||
pcm->poll_fd = slave->poll_fd;
|
||||
pcm->poll_events = slave->poll_events;
|
||||
pcm->mmap_shadow = 1;
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
|
||||
pcm->monotonic = clock_gettime(CLOCK_MONOTONIC, ×pec) == 0;
|
||||
#else
|
||||
pcm->monotonic = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue