Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/pax Fix compilation failure with gcc-8.



details:   https://anonhg.NetBSD.org/src/rev/63baa1d59bd4
branches:  trunk
changeset: 450753:63baa1d59bd4
user:      cheusov <cheusov%NetBSD.org@localhost>
date:      Wed Apr 24 17:27:08 2019 +0000

description:
Fix compilation failure with gcc-8.
  Equal pointers to 'struct sigaction' should not be passed to sigaction(2).
  So, we pass NULL as an "old sigaction" structure.

diffstat:

 bin/pax/pax.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r a1263e824bec -r 63baa1d59bd4 bin/pax/pax.c
--- a/bin/pax/pax.c     Wed Apr 24 15:12:09 2019 +0000
+++ b/bin/pax/pax.c     Wed Apr 24 17:27:08 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pax.c,v 1.48 2017/10/02 21:55:35 joerg Exp $   */
+/*     $NetBSD: pax.c,v 1.49 2019/04/24 17:27:08 cheusov Exp $ */
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -44,7 +44,7 @@
 #if 0
 static char sccsid[] = "@(#)pax.c      8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: pax.c,v 1.48 2017/10/02 21:55:35 joerg Exp $");
+__RCSID("$NetBSD: pax.c,v 1.49 2019/04/24 17:27:08 cheusov Exp $");
 #endif
 #endif /* not lint */
 
@@ -453,28 +453,28 @@
 
        if ((sigaction(SIGHUP, &n_hand, &o_hand) < 0) &&
            (o_hand.sa_handler == SIG_IGN) &&
-           (sigaction(SIGHUP, &o_hand, &o_hand) < 0))
+           (sigaction(SIGHUP, &o_hand, NULL) < 0))
                goto out;
 
        if ((sigaction(SIGTERM, &n_hand, &o_hand) < 0) &&
            (o_hand.sa_handler == SIG_IGN) &&
-           (sigaction(SIGTERM, &o_hand, &o_hand) < 0))
+           (sigaction(SIGTERM, &o_hand, NULL) < 0))
                goto out;
 
        if ((sigaction(SIGINT, &n_hand, &o_hand) < 0) &&
            (o_hand.sa_handler == SIG_IGN) &&
-           (sigaction(SIGINT, &o_hand, &o_hand) < 0))
+           (sigaction(SIGINT, &o_hand, NULL) < 0))
                goto out;
 
        if ((sigaction(SIGQUIT, &n_hand, &o_hand) < 0) &&
            (o_hand.sa_handler == SIG_IGN) &&
-           (sigaction(SIGQUIT, &o_hand, &o_hand) < 0))
+           (sigaction(SIGQUIT, &o_hand, NULL) < 0))
                goto out;
 
 #ifdef SIGXCPU
        if ((sigaction(SIGXCPU, &n_hand, &o_hand) < 0) &&
            (o_hand.sa_handler == SIG_IGN) &&
-           (sigaction(SIGXCPU, &o_hand, &o_hand) < 0))
+           (sigaction(SIGXCPU, &o_hand, NULL) < 0))
                goto out;
 #endif
        n_hand.sa_handler = SIG_IGN;



Home | Main Index | Thread Index | Old Index