[pacman-dev] [PATCH] NO_MSGSIGNAL and SIGPOLL don't exist on darwin
Eli Schwartz
eschwartz at archlinux.org
Tue Sep 1 03:08:29 UTC 2020
On 8/31/20 10:52 PM, Cameron Katri wrote:
> On darwin NO_MSGSIGNAL and SIGPOLL, don't exist, so SO_NOSIGPIPE will be used instead, which serves the same function.
IIUC this isn't usable in send(), but only in setsockopt(), so I think
you'll need a more comprehensive solution to ensure it does more than
compile.
Also why are you hardcoding the value rather than using the existing
SO_NOSIGPIPE define wherever it is found?
> From a61c9634831e5aff6cd020148516337dd4f8090f Mon Sep 17 00:00:00 2001
> From: Cameron Katri <katri.cameron at gmail.com>
> Date: Mon, 31 Aug 2020 09:50:09 -0400
> Subject: [PATCH] Fix compilation on Darwin
>
> ---
> lib/libalpm/util.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
> index b70a8192..f7d40b78 100644
> --- a/lib/libalpm/util.c
> +++ b/lib/libalpm/util.c
> @@ -34,6 +34,11 @@
> #include <fnmatch.h>
> #include <poll.h>
>
> +/* no MSG_NOSIGNAL support */
> +#ifndef MSG_NOSIGNAL
> +#define MSG_NOSIGNAL 0x1022
> +#endif
> +
> /* libarchive */
> #include <archive.h>
> #include <archive_entry.h>
> @@ -557,8 +562,11 @@ static void _alpm_reset_signals(void)
> int *i, signals[] = {
> SIGABRT, SIGALRM, SIGBUS, SIGCHLD, SIGCONT, SIGFPE, SIGHUP, SIGILL,
> SIGINT, SIGKILL, SIGPIPE, SIGQUIT, SIGSEGV, SIGSTOP, SIGTERM, SIGTSTP,
> - SIGTTIN, SIGTTOU, SIGUSR1, SIGUSR2, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP,
> + SIGTTIN, SIGTTOU, SIGUSR1, SIGUSR2, SIGPROF, SIGSYS, SIGTRAP,
> SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ,
> +#ifndef __APPLE__
> + SIGPOLL,
> +#endif
> 0
> };
> struct sigaction def;
>
--
Eli Schwartz
Bug Wrangler and Trusted User
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20200831/141fdf65/attachment.sig>
More information about the pacman-dev
mailing list