$OpenBSD: patch-common_downtime_c,v 1.1 2015/01/19 16:59:42 sthen Exp $
--- common/downtime.c.orig	Mon Jan 19 16:31:58 2015
+++ common/downtime.c	Mon Jan 19 16:34:09 2015
@@ -478,9 +478,9 @@ int handle_scheduled_downtime(scheduled_downtime *temp
 	)){
 
 		if (temp_downtime->type == HOST_DOWNTIME)
-			log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' ending %s scheduled downtime (id=%lu) with depth=%d, starttime=%lu, entrytime=%lu, triggertime=%lu, endtime=%lu, duration=%lu.\n", hst->name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, hst->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->trigger_time, temp_downtime->end_time, temp_downtime->duration);
+			log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' ending %s scheduled downtime (id=%lu) with depth=%d, starttime=%llu, entrytime=%llu, triggertime=%llu, endtime=%llu, duration=%lu.\n", hst->name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, hst->scheduled_downtime_depth, (long long)temp_downtime->start_time, (long long)temp_downtime->entry_time, (long long)temp_downtime->trigger_time, (long long)temp_downtime->end_time, temp_downtime->duration);
 		else
-			log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' ending %s scheduled downtime (id=%lu) with depth=%d, starttime=%lu, entrytime=%lu, triggertime=%lu, endtime=%lu, duration=%lu.\n", svc->description, svc->host_name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, svc->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->trigger_time, temp_downtime->end_time, temp_downtime->duration);
+			log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' ending %s scheduled downtime (id=%lu) with depth=%d, starttime=%llu, entrytime=%llu, triggertime=%llu, endtime=%llu, duration=%lu.\n", svc->description, svc->host_name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, svc->scheduled_downtime_depth, (long long)temp_downtime->start_time, (long long)temp_downtime->entry_time, (long long)temp_downtime->trigger_time, (long long)temp_downtime->end_time, temp_downtime->duration);
 
 
 #ifdef USE_EVENT_BROKER
@@ -560,9 +560,9 @@ int handle_scheduled_downtime(scheduled_downtime *temp
 	/* else we are just starting the scheduled downtime */
 	else {
 		if (temp_downtime->type == HOST_DOWNTIME)
-			log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' starting %s scheduled downtime (id=%lu) with depth=%d, starttime=%lu, entrytime=%lu, endtime=%lu, duration=%lu.\n", hst->name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, hst->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->end_time, temp_downtime->duration);
+			log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' starting %s scheduled downtime (id=%lu) with depth=%d, starttime=%llu, entrytime=%llu, endtime=%llu, duration=%lu.\n", hst->name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, hst->scheduled_downtime_depth, (long long)temp_downtime->start_time, (long long)temp_downtime->entry_time, (long long)temp_downtime->end_time, temp_downtime->duration);
 		else
-			log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' starting %s scheduled downtime (id=%lu) with depth=%d, starttime=%lu, entrytime=%lu, endtime=%lu, duration=%lu.\n", svc->description, svc->host_name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, svc->scheduled_downtime_depth, temp_downtime->start_time, temp_downtime->entry_time, temp_downtime->end_time, temp_downtime->duration);
+			log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' starting %s scheduled downtime (id=%lu) with depth=%d, starttime=%llu, entrytime=%llu, endtime=%llu, duration=%lu.\n", svc->description, svc->host_name, (temp_downtime->fixed == TRUE) ? "fixed" : "flexible", temp_downtime->downtime_id, svc->scheduled_downtime_depth, (long long)temp_downtime->start_time, (long long)temp_downtime->entry_time, (long long)temp_downtime->end_time, temp_downtime->duration);
 
 		/* this happens after restart of icinga */
 		if (temp_downtime->is_in_effect != TRUE) {
@@ -571,7 +571,7 @@ int handle_scheduled_downtime(scheduled_downtime *temp
 				/* set the trigger time, needed to detect the end of a flexible downtime */
 				temp_downtime->trigger_time = current_time;
 
-				log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' has entered a period of scheduled downtime (id=%lu) at triggertime=%lu.\n", hst->name, temp_downtime->downtime_id, temp_downtime->trigger_time);
+				log_debug_info(DEBUGL_DOWNTIME, 0, "Host '%s' has entered a period of scheduled downtime (id=%lu) at triggertime=%llu.\n", hst->name, temp_downtime->downtime_id, (long long)temp_downtime->trigger_time);
 
 				/* log a notice - this one is parsed by the history CGI */
 				logit(NSLOG_INFO_MESSAGE, FALSE, "HOST DOWNTIME ALERT: %s;STARTED; Host has entered a period of scheduled downtime", hst->name);
@@ -585,7 +585,7 @@ int handle_scheduled_downtime(scheduled_downtime *temp
 				/* set the trigger time, needed to detect the end of a flexible downtime */
 				temp_downtime->trigger_time = current_time;
 
-				log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' has entered a period of scheduled downtime (id=%lu) at triggertime=%lu.\n", svc->description, svc->host_name, temp_downtime->downtime_id, temp_downtime->trigger_time);
+				log_debug_info(DEBUGL_DOWNTIME, 0, "Service '%s' on host '%s' has entered a period of scheduled downtime (id=%lu) at triggertime=%llu.\n", svc->description, svc->host_name, temp_downtime->downtime_id, (long long)temp_downtime->trigger_time);
 
 				/* log a notice - this one is parsed by the history CGI */
 				logit(NSLOG_INFO_MESSAGE, FALSE, "SERVICE DOWNTIME ALERT: %s;%s;STARTED; Service has entered a period of scheduled downtime", svc->host_name, svc->description);
