diff options
| author | joerg <joerg@NetBSD.org> | 2019-11-05 22:22:42 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2019-11-05 22:22:42 +0000 |
| commit | fcc27c2e63a94a71d2b8102697231b31a09f74f2 (patch) | |
| tree | b4e8109ff4c4bd5a7a5a659fb0b7b84a479fd8b4 /libexec | |
| parent | 0d1c088d3b6d7b0e19f220aadacd0072369e50cc (diff) | |
Use alignof and not size_t for platforms with non-natural base
alignments.
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/ld.elf_so/tls.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/ld.elf_so/tls.c b/libexec/ld.elf_so/tls.c index f765fa31944..c67e51ef048 100644 --- a/libexec/ld.elf_so/tls.c +++ b/libexec/ld.elf_so/tls.c @@ -1,4 +1,4 @@ -/* $NetBSD: tls.c,v 1.13 2019/11/04 12:45:10 joerg Exp $ */ +/* $NetBSD: tls.c,v 1.14 2019/11/05 22:22:42 joerg Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,11 +29,12 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: tls.c,v 1.13 2019/11/04 12:45:10 joerg Exp $"); +__RCSID("$NetBSD: tls.c,v 1.14 2019/11/05 22:22:42 joerg Exp $"); #include <sys/param.h> #include <sys/ucontext.h> #include <lwp.h> +#include <stdalign.h> #include <stddef.h> #include <string.h> #include "debug.h" @@ -100,7 +101,7 @@ _rtld_tls_initial_allocation(void) #ifndef __HAVE_TLS_VARIANT_I _rtld_tls_static_space = roundup2(_rtld_tls_static_space, - sizeof(max_align_t)); + alignof(max_align_t)); #endif dbg(("_rtld_tls_static_space %zu", _rtld_tls_static_space)); |
