diff mbox series

[v6,1/3] RISC-V: Add include guard for dl-tls.h.

Message ID 20240329061834.40019-2-ishitatsuyuki@gmail.com
State New
Headers show
Series RISC-V: Implement TLS Descriptors. | expand

Commit Message

Tatsuyuki Ishi March 29, 2024, 6:18 a.m. UTC
The to-be-added dl-tlsdesc.h will depend on tls_index from dl-tls.h.
Add an include guard to avoid confusing issues when including both.
---
 sysdeps/riscv/dl-tls.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Adhemerval Zanella Netto April 3, 2024, 11:48 a.m. UTC | #1
On 29/03/24 03:18, Tatsuyuki Ishi wrote:
> The to-be-added dl-tlsdesc.h will depend on tls_index from dl-tls.h.
> Add an include guard to avoid confusing issues when including both.

This seems obvious enough.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/riscv/dl-tls.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/sysdeps/riscv/dl-tls.h b/sysdeps/riscv/dl-tls.h
> index 049161f02f..42914c752b 100644
> --- a/sysdeps/riscv/dl-tls.h
> +++ b/sysdeps/riscv/dl-tls.h
> @@ -16,6 +16,8 @@
>     License along with the GNU C Library.  If not, see
>     <https://www.gnu.org/licenses/>.  */
>  
> +#ifndef _DL_TLS_H
> +# define _DL_TLS_H 1
>  
>  /* Type used for the representation of TLS information in the GOT.  */
>  typedef struct
> @@ -46,3 +48,5 @@ extern void *__tls_get_addr (tls_index *ti);
>  
>  /* Value used for dtv entries for which the allocation is delayed.  */
>  #define TLS_DTV_UNALLOCATED	((void *) -1l)
> +
> +#endif /* _DL_TLS_H */
diff mbox series

Patch

diff --git a/sysdeps/riscv/dl-tls.h b/sysdeps/riscv/dl-tls.h
index 049161f02f..42914c752b 100644
--- a/sysdeps/riscv/dl-tls.h
+++ b/sysdeps/riscv/dl-tls.h
@@ -16,6 +16,8 @@ 
    License along with the GNU C Library.  If not, see
    <https://www.gnu.org/licenses/>.  */
 
+#ifndef _DL_TLS_H
+# define _DL_TLS_H 1
 
 /* Type used for the representation of TLS information in the GOT.  */
 typedef struct
@@ -46,3 +48,5 @@  extern void *__tls_get_addr (tls_index *ti);
 
 /* Value used for dtv entries for which the allocation is delayed.  */
 #define TLS_DTV_UNALLOCATED	((void *) -1l)
+
+#endif /* _DL_TLS_H */