git: 04085d4b69dc - stable/13 - rtld_malloc: only include internal rtld headers when building for rtld

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 02 Aug 2023 00:37:16 UTC
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=04085d4b69dc556c42ada27b0ec448ddc896f09a

commit 04085d4b69dc556c42ada27b0ec448ddc896f09a
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-07-22 04:39:20 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-08-02 00:36:39 +0000

    rtld_malloc: only include internal rtld headers when building for rtld
    
    (cherry picked from commit bc7e86106d428c7da328ad7fc9d4cb5f7f303e0e)
---
 libexec/rtld-elf/rtld_malloc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libexec/rtld-elf/rtld_malloc.c b/libexec/rtld-elf/rtld_malloc.c
index 6660610b11ce..45d3f743e348 100644
--- a/libexec/rtld-elf/rtld_malloc.c
+++ b/libexec/rtld-elf/rtld_malloc.c
@@ -53,9 +53,11 @@ static char *rcsid = "$FreeBSD$";
 #include <stddef.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef IN_RTLD
 #include "rtld.h"
 #include "rtld_printf.h"
 #include "rtld_paths.h"
+#endif
 #include "rtld_malloc.h"
 
 /*