From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id 0D07E385828F; Fri, 26 Aug 2022 09:28:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D07E385828F Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] PR12265, Compiling ld/ fails on Solaris 8 X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: 8d00b2b74b8cb55432d2a497eec22cac582d9ea7 X-Git-Newrev: 3055522ab17ac7c6781a3507ebac0fab1c3aa5a4 Message-Id: <20220826092835.0D07E385828F@sourceware.org> Date: Fri, 26 Aug 2022 09:28:35 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2022 09:28:35 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D3055522ab17a= c7c6781a3507ebac0fab1c3aa5a4 commit 3055522ab17ac7c6781a3507ebac0fab1c3aa5a4 Author: Alan Modra Date: Fri Aug 26 17:45:09 2022 +0930 PR12265, Compiling ld/ fails on Solaris 8 =20 The fail was due to -Werror and headers included by dlfcn.h and elf-bfd.h disagreeing about AT_DCACHEBSIZE and other AT_*. Not a serious problem obviously, since release versions of binutils don't enable -Werror and the defines are not used. Anyway, reduce the number of files that might hit this problem by only including dlfcn.h where it is needed. =20 PR 12265 * sysdep.h: Don't include dlfcn.h here. * plugin.c: Include it here. Diff: --- ld/plugin.c | 4 +++- ld/sysdep.h | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ld/plugin.c b/ld/plugin.c index fe203104677..51554932e91 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -51,7 +51,9 @@ #if !(defined(errno) || defined(_MSC_VER) && defined(_INC_ERRNO)) extern int errno; #endif -#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H) +#if defined (HAVE_DLFCN_H) +#include +#elif defined (HAVE_WINDOWS_H) #include #endif =20 diff --git a/ld/sysdep.h b/ld/sysdep.h index b55a1c29518..91f98572eea 100644 --- a/ld/sysdep.h +++ b/ld/sysdep.h @@ -61,10 +61,6 @@ #endif #endif =20 -#ifdef HAVE_DLFCN_H -#include -#endif - #ifndef O_RDONLY #define O_RDONLY 0 #endif