From 56478e024884e50fa17d4b35aee77776cc483a84 Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Mon, 16 Nov 2020 17:08:19 -0700 Subject: [PATCH 1/2] [core] fix build when undefined APR_INET6 --- src/switch_apr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/switch_apr.c b/src/switch_apr.c index c033d87bc4..91204acba7 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -848,13 +848,16 @@ SWITCH_DECLARE(switch_status_t) switch_sockaddr_new(switch_sockaddr_t ** sa, con new_sa->pool = pool; +#if APR_HAVE_IPV6 if (strchr(ip, ':')) { struct sockaddr_in6 sa6 = { 0 }; family = APR_INET6; inet_pton(family, ip, &(sa6.sin6_addr)); memcpy(&new_sa->sa, &sa6, sizeof(struct sockaddr_in6)); - } else { + } else +#endif + { struct sockaddr_in sa4 = { 0 }; family = APR_INET; From 6837661658826ef3b90e3f759f6cac6aa03cdc92 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 19 Mar 2020 03:08:33 +0000 Subject: [PATCH 2/2] [libvpx] add yield to vpx --- libs/libvpx/.update | 2 +- libs/libvpx/vp8/common/threading.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/libvpx/.update b/libs/libvpx/.update index 09e6d8ef57..815a0a77a8 100644 --- a/libs/libvpx/.update +++ b/libs/libvpx/.update @@ -1 +1 @@ -Wed Feb 27 11:26:31 MST 2019 +Thu Mar 19 03:08:11 UTC 2020 diff --git a/libs/libvpx/vp8/common/threading.h b/libs/libvpx/vp8/common/threading.h index 7a637cdff2..f2e5e8c54f 100644 --- a/libs/libvpx/vp8/common/threading.h +++ b/libs/libvpx/vp8/common/threading.h @@ -171,11 +171,11 @@ static inline int sem_destroy(sem_t *sem) { #define sem_wait(sem) (semaphore_wait(*sem)) #define sem_post(sem) semaphore_signal(*sem) #define sem_destroy(sem) semaphore_destroy(mach_task_self(), *sem) -#define thread_sleep(nms) { struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} +#define thread_sleep(nms) { struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;sched_yield();nanosleep(&ts, NULL);} #else #include #include -#define thread_sleep(nms) {struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} +#define thread_sleep(nms) {struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;sched_yield();clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL);} #endif /* Not Windows. Assume pthreads */