Patchwork [07/10] C11 threads: Fix thrd_t / pthread_t compatibility assertion

login
register
mail settings
Submitter Samuel Thibault
Date Jan. 14, 2020, 6:52 p.m.
Message ID <20200114185255.25813-9-samuel.thibault@ens-lyon.org>
Download mbox | patch
Permalink /patch/37380/
State New
Headers show

Comments

Samuel Thibault - Jan. 14, 2020, 6:52 p.m.
---
 nptl/thrd_create.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/nptl/thrd_create.c b/nptl/thrd_create.c
index 8474e234c9..fe08e22973 100644
--- a/nptl/thrd_create.c
+++ b/nptl/thrd_create.c
@@ -21,8 +21,8 @@ 
 int
 thrd_create (thrd_t *thr, thrd_start_t func, void *arg)
 {
-  _Static_assert (sizeof (thr) == sizeof (pthread_t),
-		  "sizeof (thr) != sizeof (pthread_t)");
+  _Static_assert (sizeof (*thr) == sizeof (pthread_t),
+		  "sizeof (*thr) != sizeof (pthread_t)");
 
   int err_code = __pthread_create_2_1 (thr, ATTR_C11_THREAD,
 				       (void* (*) (void*))func, arg);