b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | --- a/src/pcm/pcm_shm.c |
| 2 | +++ b/src/pcm/pcm_shm.c |
| 3 | @@ -46,6 +46,14 @@ |
| 4 | #include <netdb.h> |
| 5 | #include "aserver.h" |
| 6 | |
| 7 | +#if _POSIX_C_SOURCE >= 200809L |
| 8 | +#define usleep(a) \ |
| 9 | + do { \ |
| 10 | + const struct timespec req = {0, a * 1000}; \ |
| 11 | + nanosleep(&req, NULL); \ |
| 12 | + } while(0) |
| 13 | +#endif |
| 14 | + |
| 15 | #ifndef PIC |
| 16 | /* entry for static linking */ |
| 17 | const char *_snd_module_pcm_shm = ""; |
| 18 | --- a/src/ucm/ucm_local.h |
| 19 | +++ b/src/ucm/ucm_local.h |
| 20 | @@ -61,6 +61,14 @@ |
| 21 | #define SEQUENCE_ELEMENT_TYPE_DEV_DISABLE_SEQ 14 |
| 22 | #define SEQUENCE_ELEMENT_TYPE_DEV_DISABLE_ALL 15 |
| 23 | |
| 24 | +#if _POSIX_C_SOURCE >= 200809L |
| 25 | +#define usleep(a) \ |
| 26 | + do { \ |
| 27 | + const struct timespec req = {0, a * 1000}; \ |
| 28 | + nanosleep(&req, NULL); \ |
| 29 | + } while(0) |
| 30 | +#endif |
| 31 | + |
| 32 | struct ucm_value { |
| 33 | struct list_head list; |
| 34 | char *name; |