pthread-cond: Fix compilation error.
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Mon, 5 Apr 2021 10:44:41 +0000 (12:44 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 5 Apr 2021 10:44:41 +0000 (12:44 +0200)
* lib/pthread-cond.c (pthread_cond_wait): Use tv.nsec instead of
tv.usec.

ChangeLog
lib/pthread-cond.c

index 3c8e78ddffd4232d2ff7223d39f65f85b0271ef6..e8a27df73b2056023eb295818fa9c78a040d71de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-05  Fabrice Fontaine  <fontaine.fabrice@gmail.com>
+
+       pthread-cond: Fix compilation error.
+       * lib/pthread-cond.c (pthread_cond_wait): Use tv.nsec instead of
+       tv.usec.
+
 2021-04-04  Fabrice Fontaine  <fontaine.fabrice@gmail.com>
 
        pthread-cond: Fix wrong configure results when <pthread.h> is absent.
index baa7c60bb4216dd108a16157255fbe43bba12dbc..c2c00be034f640db77d9b1b0e11e07a67d51a3cb 100644 (file)
@@ -118,7 +118,7 @@ pthread_cond_wait (pthread_cond_t *cond _GL_UNUSED,
       struct timespec duration;
 
       duration.tv_sec = 86400;
-      duration.tv_usec = 0;
+      duration.tv_nsec = 0;
       nanosleep (&duration, NULL);
     }
 }