From b505af9a3a9b2813d3359194ac5a0b9221944850 Mon Sep 17 00:00:00 2001 From: "Eric N. Vander Weele" Date: Fri, 18 Mar 2016 14:31:12 -0700 Subject: [PATCH] Replace usage of _NSIG with SIGRTMAX POSIX specification defines SIGRTMAX. _NSIG is not defined on all platforms (e.g, AIX). Signed-off-by: Eric N. Vander Weele --- libarchive_fe/passphrase.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libarchive_fe/passphrase.c b/libarchive_fe/passphrase.c index 96d8f0a7b..c9eaba641 100644 --- a/libarchive_fe/passphrase.c +++ b/libarchive_fe/passphrase.c @@ -142,7 +142,7 @@ readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) # define _POSIX_VDISABLE VDISABLE #endif -static volatile sig_atomic_t signo[_NSIG]; +static volatile sig_atomic_t signo[SIGRTMAX]; static void handler(int s) @@ -168,7 +168,7 @@ readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) } restart: - for (i = 0; i < _NSIG; i++) + for (i = 0; i < SIGRTMAX; i++) signo[i] = 0; nr = -1; save_errno = 0; @@ -273,7 +273,7 @@ restart: * If we were interrupted by a signal, resend it to ourselves * now that we have restored the signal handlers. */ - for (i = 0; i < _NSIG; i++) { + for (i = 0; i < SIGRTMAX; i++) { if (signo[i]) { kill(getpid(), i); switch (i) { -- 2.47.2