summaryrefslogtreecommitdiffstats
path: root/patches/watchdog-5.7/0001-Fix-compile-with-USE_SYSLOG-disabled.patch
blob: 479afa1398854dca9a8b1a5294a8741677dc9ebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 10bc35db707c552a2dcf002eccd6dbc644a33bcd Mon Sep 17 00:00:00 2001
From: Jon Ringle <jon@ringle.org>
Date: Tue, 2 Mar 2010 20:49:26 -0500
Subject: [PATCH 1/2] Fix compile with USE_SYSLOG disabled

Signed-off-by: Jon Ringle <jon@ringle.org>
---
 src/shutdown.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/shutdown.c b/src/shutdown.c
index c743d8e..7490906 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -354,10 +354,11 @@ void do_shutdown(int errorcode)
 	 * We cannot let the shell check, because a non-existant or
 	 * non-executable sendmail binary means that the pipe is closed faster
 	 * than we can write to it. */
-	if ((stat(PATH_SENDMAIL, &buf) != 0) || ((buf.st_mode&S_IXUSR) == 0))
+	if ((stat(PATH_SENDMAIL, &buf) != 0) || ((buf.st_mode&S_IXUSR) == 0)) {
 #if USE_SYSLOG
 		syslog(LOG_ERR, "%s does not exist or is not executable (errno = %d)", PATH_SENDMAIL, errno);
 #endif				/* USE_SYSLOG */
+	}
 	else
 	{
 		sprintf(exe, "%s -i %s", PATH_SENDMAIL, admin);
-- 
1.7.0.rc2