#include <mit-copyright.h>
#include <stdio.h>
+#include <sys/types.h>
#include <sys/file.h>
#include <moira_site.h>
#ifdef ZEPHYR
#ifdef SYSLOG
#include <syslog.h>
#endif
+#include <string.h>
/* mode to create the file with */
/* Log message to critical file */
if ((crit = fopen(CRITERRLOG, "a")) != (FILE *)NULL)
{
- long t;
+ long t, time();
char *time_s;
time(&t);
#ifdef ZEPHYR
ZNotice_t znotice;
+#ifdef POSIX
+ memset (&znotice, 0, sizeof (znotice));
+#else
bzero (&znotice, sizeof (znotice));
+#endif
znotice.z_kind = UNSAFE;
znotice.z_class = "MOIRA";
znotice.z_class_inst = inst;
- znotice.z_default_format = "MOIRA $instance:\n $message\n";
+ znotice.z_default_format = "MOIRA $instance on $fromhost:\n $message\n";
(void) ZInitialize ();
znotice.z_message = msg;
znotice.z_message_len = strlen(msg) + 1;