packages/libs/alsa-lib/patches/200-usleep.patch
Rosen Penev 47b48b2088 alsa-lib: update to 1.2.5
Refresh patches. Remove upstream one.

Switch to AUTORELEASE for simplicity.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-12 20:27:52 -07:00

34 lines
748 B
Diff

--- a/src/pcm/pcm_shm.c
+++ b/src/pcm/pcm_shm.c
@@ -45,6 +45,14 @@
#include <netdb.h>
#include "aserver.h"
+#if _POSIX_C_SOURCE >= 200809L
+#define usleep(a) \
+ do { \
+ const struct timespec req = {0, a * 1000}; \
+ nanosleep(&req, NULL); \
+ } while(0)
+#endif
+
#ifndef PIC
/* entry for static linking */
const char *_snd_module_pcm_shm = "";
--- a/src/ucm/ucm_local.h
+++ b/src/ucm/ucm_local.h
@@ -58,6 +58,14 @@
#define SEQUENCE_ELEMENT_TYPE_SYSSET 11
#define SEQUENCE_ELEMENT_TYPE_CFGSAVE 12
+#if _POSIX_C_SOURCE >= 200809L
+#define usleep(a) \
+ do { \
+ const struct timespec req = {0, a * 1000}; \
+ nanosleep(&req, NULL); \
+ } while(0)
+#endif
+
struct ucm_value {
struct list_head list;
char *name;