[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 2 commits: iochannel: Fix FTBFS on GNU/Hurd
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Thu Dec 16 16:30:11 UTC 2021
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
ea205553 by Laurent Bigonville at 2021-12-16T16:17:13+01:00
iochannel: Fix FTBFS on GNU/Hurd
This is a followup patch for 0efc38e95fafa84934da9c03c200303cac7da16a
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/671>
- - - - -
6e45a644 by Laurent Bigonville at 2021-12-16T16:26:11+01:00
util: Fix getting the binary name for GNU/Hurd
This fixes the get-binary-name-test test
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/671>
- - - - -
2 changed files:
- src/pulse/util.c
- src/pulsecore/iochannel.c
Changes:
=====================================
src/pulse/util.c
=====================================
@@ -228,7 +228,7 @@ char *pa_get_binary_name(char *s, size_t l) {
}
#endif
-#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__))
+#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || defined(__GNU__)
{
char *rp;
/* This works on Linux and Debian/kFreeBSD */
=====================================
src/pulsecore/iochannel.c
=====================================
@@ -261,7 +261,7 @@ ssize_t pa_iochannel_read(pa_iochannel*io, void*data, size_t l) {
#ifdef HAVE_CREDS
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
typedef struct cmsgcred pa_ucred_t;
#define SCM_CREDENTIALS SCM_CREDS
#else
@@ -291,14 +291,14 @@ bool pa_iochannel_creds_supported(pa_iochannel *io) {
}
int pa_iochannel_creds_enable(pa_iochannel *io) {
-#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
int t = 1;
#endif
pa_assert(io);
pa_assert(io->ifd >= 0);
-#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
if (setsockopt(io->ifd, SOL_SOCKET, SO_PASSCRED, &t, sizeof(t)) < 0) {
pa_log_error("setsockopt(SOL_SOCKET, SO_PASSCRED): %s", pa_cstrerror(errno));
return -1;
@@ -334,7 +334,7 @@ ssize_t pa_iochannel_write_with_creds(pa_iochannel*io, const void*data, size_t l
u = (pa_ucred_t*) CMSG_DATA(&cmsg.hdr);
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
// the kernel fills everything
#else
u->pid = getpid();
@@ -457,7 +457,7 @@ ssize_t pa_iochannel_read_with_ancil_data(pa_iochannel*io, void*data, size_t l,
pa_ucred_t u;
pa_assert(cmh->cmsg_len == CMSG_LEN(sizeof(pa_ucred_t)));
memcpy(&u, CMSG_DATA(cmh), sizeof(pa_ucred_t));
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
ancil_data->creds.gid = u.cmcred_gid;
ancil_data->creds.uid = u.cmcred_uid;
#else
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/a9cc1373e2a79396569b2fe6164797b0ed0cb3d1...6e45a644787e723b9b99303c10f3e8fcbb4d7b11
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/a9cc1373e2a79396569b2fe6164797b0ed0cb3d1...6e45a644787e723b9b99303c10f3e8fcbb4d7b11
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20211216/7cfdc2b8/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list