Created SILC Runtime Toolkit git repository Part II.
[runtime.git] / lib / silcutil / unix / silcunixutil.c
index 50e01d07b92282fbb31db4980053741b6cc2ee9b..def4f1d783913b291909fbf9d0a8c820c8a9da07 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2007 Pekka Riikonen
+  Copyright (C) 1997 - 2008 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 */
 
-#include "silc.h"
+#include "silcruntime.h"
 
 /* Returns the username of the user. If the global variable LOGNAME
    does not exists we will get the name from the password file. */
@@ -71,7 +71,8 @@ int silc_gettimeofday(struct timeval *p)
 {
 #if defined(HAVE_CLOCK_GETTIME)
   struct timespec tp;
-  clock_gettime(CLOCK_REALTIME, &tp);
+  if (clock_gettime(CLOCK_REALTIME, &tp))
+    return -1;
   p->tv_sec = tp.tv_sec;
   p->tv_usec = tp.tv_nsec / 1000;
   return 0;