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

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

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed

Commit Message

Tatsuyuki Ishi Sept. 14, 2023, 8:40 a.m. UTC
  ---
 sysdeps/riscv/dl-tls.h | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Fangrui Song Jan. 27, 2024, 1:14 a.m. UTC | #1
On Thu, Sep 14, 2023 at 1:41 AM Tatsuyuki Ishi <ishitatsuyuki@gmail.com> wrote:
>
> ---
>  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 67c8ae639c..f11f335edf 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 */
> --
> 2.42.0
>

This commit message should state why the header is needed.
Multiple sysdeps/*/dl-tls.h do not have a guard and they are good.
  

Patch

diff --git a/sysdeps/riscv/dl-tls.h b/sysdeps/riscv/dl-tls.h
index 67c8ae639c..f11f335edf 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 */