buildroot/package/coreutils/0003-lib-pthread-cond.c-use-tv.nsec-instead-of-tv.usec.patch
Fabrice Fontaine b3ba0f1d2f package/coreutils: fix build without threads
Build of coreutils without threads is broken since bump to version 8.32
in commit b4a0f9fb0e

Fixes:
 - http://autobuild.buildroot.org/results/8d00bdabef73daa2a1d1f4c6e183dda447a82134

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[yann.morin.1998@free.fr:
  - do an actual backport of patch 0002
  - add upstream status for patch 0003
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-04-05 12:22:23 +02:00

36 lines
1.1 KiB
Diff

From 67610020ce7c321678ef59af95fde0483e8e8149 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 4 Apr 2021 21:09:19 +0200
Subject: [PATCH] lib/pthread-cond.c: use tv.nsec instead of tv.usec
Use tv.nsec instead of tv.usec to avoid the following build failure:
lib/pthread-cond.c: In function 'pthread_cond_wait':
lib/pthread-cond.c:121:16: error: 'struct timespec' has no member named 'tv_usec'; did you mean 'tv_sec'?
121 | duration.tv_usec = 0;
| ^~~~~~~
| tv_sec
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[upstream status: https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00044.html]
---
lib/pthread-cond.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pthread-cond.c b/lib/pthread-cond.c
index baa7c60bb..c2c00be03 100644
--- a/lib/pthread-cond.c
+++ b/lib/pthread-cond.c
@@ -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);
}
}
--
2.30.2