From 3055522ab17ac7c6781a3507ebac0fab1c3aa5a4 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 26 Aug 2022 17:45:09 +0930 Subject: PR12265, Compiling ld/ fails on Solaris 8 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. PR 12265 * sysdep.h: Don't include dlfcn.h here. * plugin.c: Include it here. --- ld/plugin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ld/plugin.c') 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 -- cgit v1.2.3