Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Handle different types for second parameter of gettimeofday.
[simgrid.git] / src / sthread / sthread.c
index 0de4be3..34d4230 100644 (file)
@@ -147,9 +147,13 @@ int pthread_mutex_destroy(pthread_mutex_t* mutex)
   return res;
 }
 
-int gettimeofday(struct timeval* tv, void* tz)
+#if !defined(__GLIBC__) || __GLIBC_PREREQ(2, 31)
+int gettimeofday(struct timeval* tv, XBT_ATTRIB_UNUSED void* tz)
+#else
+int gettimeofday(struct timeval* tv, XBT_ATTRIB_UNUSED struct timezone* tz)
+#endif
 {
-  return sthread_gettimeofday(tv, tz);
+  return sthread_gettimeofday(tv);
 }
 
 unsigned int sleep(unsigned int seconds)