diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2020-08-30 00:22:31 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2020-08-30 00:22:31 +0000 |
commit | b864b9cf01d5c346e2028fe85124cb973b52e1d3 (patch) | |
tree | 6eb117150700eaababf798b87d66134cf914b5f8 /mail | |
parent | 6dd5c6d0d7e44fd89261647a687f3a5d9de3835a (diff) | |
download | ports-b864b9cf01d5c346e2028fe85124cb973b52e1d3.tar.gz ports-b864b9cf01d5c346e2028fe85124cb973b52e1d3.zip |
MFH: r546956
gecko: update OSS patches
Changes: https://github.com/kinetiknz/cubeb/compare/957847c...49312d4
Approved by: ports-secteam blanket
Notes
Notes:
svn path=/branches/2020Q3/; revision=546961
Diffstat (limited to 'mail')
-rw-r--r-- | mail/thunderbird/Makefile | 1 | ||||
-rw-r--r-- | mail/thunderbird/files/patch-cubeb-oss | 34 |
2 files changed, 29 insertions, 6 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile index 349d71b8ce68..edf79d9741a5 100644 --- a/mail/thunderbird/Makefile +++ b/mail/thunderbird/Makefile @@ -3,6 +3,7 @@ PORTNAME= thunderbird DISTVERSION= 68.12.0 +PORTREVISION= 1 CATEGORIES= mail news net-im MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source diff --git a/mail/thunderbird/files/patch-cubeb-oss b/mail/thunderbird/files/patch-cubeb-oss index 7a5e46dc338f..a2dd3a22002e 100644 --- a/mail/thunderbird/files/patch-cubeb-oss +++ b/mail/thunderbird/files/patch-cubeb-oss @@ -61,7 +61,7 @@ https://github.com/kinetiknz/cubeb/pull/600 #endif --- /dev/null +++ media/libcubeb/src/cubeb_oss.c -@@ -0,0 +1,1129 @@ +@@ -0,0 +1,1151 @@ +/* + * Copyright © 2019-2020 Nia Alarie <nia@NetBSD.org> + * Copyright © 2020 Ka Ho Ng <khng300@gmail.com> @@ -150,6 +150,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + struct cubeb_ops const * ops; + + /* Our intern string store */ ++ pthread_mutex_t mutex; /* protects devid_strs */ + cubeb_strings *devid_strs; +}; + @@ -184,6 +185,16 @@ https://github.com/kinetiknz/cubeb/pull/600 + unsigned int nfr; /* Number of frames allocated */ +}; + ++static char const * ++oss_cubeb_devid_intern(cubeb *context, char const * devid) ++{ ++ char const *is; ++ pthread_mutex_lock(&context->mutex); ++ is = cubeb_strings_intern(context->devid_strs, devid); ++ pthread_mutex_unlock(&context->mutex); ++ return is; ++} ++ +int +oss_init(cubeb **context, char const *context_name) { + cubeb * c; @@ -192,18 +203,29 @@ https://github.com/kinetiknz/cubeb/pull/600 + if ((c = calloc(1, sizeof(cubeb))) == NULL) { + return CUBEB_ERROR; + } ++ + if (cubeb_strings_init(&c->devid_strs) == CUBEB_ERROR) { -+ free(c); -+ return CUBEB_ERROR; ++ goto fail; + } ++ ++ if (pthread_mutex_init(&c->mutex, NULL) != 0) { ++ goto fail; ++ } ++ + c->ops = &oss_ops; + *context = c; + return CUBEB_OK; ++ ++fail: ++ cubeb_strings_destroy(c->devid_strs); ++ free(c); ++ return CUBEB_ERROR; +} + +static void +oss_destroy(cubeb * context) +{ ++ pthread_mutex_destroy(&context->mutex); + cubeb_strings_destroy(context->devid_strs); + free(context); +} @@ -433,7 +455,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + if (oss_probe_open(sinfo.devname, type, NULL, &ai)) + continue; + -+ devid = cubeb_strings_intern(context->devid_strs, sinfo.devname); ++ devid = oss_cubeb_devid_intern(context, sinfo.devname); + if (devid == NULL) + continue; + @@ -546,7 +568,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + } + cdi.type = type; + -+ devid = cubeb_strings_intern(context->devid_strs, ai.devnode); ++ devid = oss_cubeb_devid_intern(context, ai.devnode); + cdi.device_id = strdup(ai.name); + cdi.friendly_name = strdup(ai.name); + cdi.group_id = strdup(ai.name); @@ -877,7 +899,7 @@ https://github.com/kinetiknz/cubeb/pull/600 + + if ((pfds[0].revents & (POLLERR|POLLHUP)) || + (pfds[1].revents & (POLLERR|POLLHUP))) { -+ LOG("Error occured on playback or record fds", errno); ++ LOG("Error %d occured on playback or record fds", errno); + state = CUBEB_STATE_ERROR; + break; + } |