From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-987026-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id A5DC0139082
	for <garchives@archives.gentoo.org>; Tue, 28 Nov 2017 23:17:06 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 6C717E0BDF;
	Tue, 28 Nov 2017 23:17:05 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 4215AE0BDF
	for <gentoo-commits@lists.gentoo.org>; Tue, 28 Nov 2017 23:17:05 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 516CF33D3CE
	for <gentoo-commits@lists.gentoo.org>; Tue, 28 Nov 2017 23:17:04 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id BAA3DAAF7
	for <gentoo-commits@lists.gentoo.org>; Tue, 28 Nov 2017 23:17:02 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" <williamh@gentoo.org>
Message-ID: <1511802600.6bb7ebec483a96e258c64ea3fea18358d7893fee.williamh@OpenRC>
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
X-VCS-Repository: proj/openrc
X-VCS-Files: src/rc/supervise-daemon.c
X-VCS-Directories: src/rc/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: 6bb7ebec483a96e258c64ea3fea18358d7893fee
X-VCS-Branch: master
Date: Tue, 28 Nov 2017 23:17:02 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 961e7a51-ad4c-4661-9b3d-a8433736b285
X-Archives-Hash: 44ddf202eb36bf604ce5ac7e020481fd

commit:     6bb7ebec483a96e258c64ea3fea18358d7893fee
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Nov 27 17:09:43 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Nov 27 17:10:00 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=6bb7ebec

fix FreeBSD build

This is for #186.

 src/rc/supervise-daemon.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index f3f51ff0..06d0bdb3 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -159,7 +159,7 @@ static void cleanup(void)
 	free(changeuser);
 }
 
-static void re_exec(void)
+static void re_exec_supervisor(void)
 {
 	syslog(LOG_WARNING, "Re-executing for %s", svcname);
 	execlp("supervise-daemon", "supervise-daemon", svcname, "--reexec",
@@ -180,7 +180,7 @@ static void handle_signal(int sig)
 	/* Restore errno */
 	errno = serrno;
 	if (! exiting)
-		re_exec();
+		re_exec_supervisor();
 }
 
 static char * expand_home(const char *home, const char *path)
@@ -435,7 +435,9 @@ static void supervisor(char *exec, char **argv)
 	signal_setup_restart(SIGUSR1, handle_signal);
 	signal_setup_restart(SIGUSR2, handle_signal);
 	signal_setup_restart(SIGBUS, handle_signal);
+#ifdef SIGPOLL
 	signal_setup_restart(SIGPOLL, handle_signal);
+#endif
 	signal_setup_restart(SIGPROF, handle_signal);
 	signal_setup_restart(SIGSYS, handle_signal);
 	signal_setup_restart(SIGTRAP, handle_signal);
@@ -446,7 +448,9 @@ static void supervisor(char *exec, char **argv)
 	signal_setup_restart(SIGEMT, handle_signal);
 #endif
 	signal_setup_restart(SIGIO, handle_signal);
+#ifdef SIGPWR
 	signal_setup_restart(SIGPWR, handle_signal);
+#endif
 #ifdef SIGUNUSED
 	signal_setup_restart(SIGUNUSED, handle_signal);
 #endif