public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] PR12265, Compiling ld/ fails on Solaris 8
Date: Fri, 26 Aug 2022 09:28:35 +0000 (GMT)	[thread overview]
Message-ID: <20220826092835.0D07E385828F@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3055522ab17ac7c6781a3507ebac0fab1c3aa5a4

commit 3055522ab17ac7c6781a3507ebac0fab1c3aa5a4
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Aug 26 17:45:09 2022 +0930

    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.

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 <dlfcn.h>
+#elif defined (HAVE_WINDOWS_H)
 #include <windows.h>
 #endif
 
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
 
-#ifdef HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
 #ifndef O_RDONLY
 #define O_RDONLY 0
 #endif

                 reply	other threads:[~2022-08-26  9:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220826092835.0D07E385828F@sourceware.org \
    --to=amodra@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).