Added SILC errno API. Added SilcResult, generic error code and
[silc.git] / lib / silcutil / unix / silcunixutil.c
index 50e01d07b92282fbb31db4980053741b6cc2ee9b..ef608f92e54b699f18f489f2a0776040bc300b37 100644 (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;