/*
- * Copyright (C) 1997-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2013 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
#include <pwd.h>
#include <sys/types.h> /* getgrnam() */
#include <grp.h>
-#include <sys/time.h>
-#include <stdbool.h>
#include <signal.h>
#include "para.h"
* \param arg The loglevel/color specifier.
*
* \a arg must be of the form "ll:[fg [bg]] [attr]".
- *
- * \return 1 On success, -1 on errors.
*/
void daemon_set_log_color_or_die(char const *arg)
{
fprintf(fp, "%s", color);
if (log_time || log_timing) {
struct timeval tv;
- gettimeofday(&tv, NULL);
+ clock_get_realtime(&tv);
if (daemon_test_flag(DF_LOG_TIME)) { /* print date and time */
time_t t1 = tv.tv_sec;
char str[100];