From: Christian Biesinger via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Christian Biesinger <cbiesinger@chromium.org>
Subject: [PATCH] [sim] Include defs.h in ppc/hw_memory.c
Date: Fri, 8 Oct 2021 16:16:57 -0400 [thread overview]
Message-ID: <20211008201657.630932-1-cbiesinger@google.com> (raw)
From: Christian Biesinger <cbiesinger@chromium.org>
To fix this error (seen on cygwin):
/../../sim/ppc/../common ../../../sim/ppc/hw_memory.c
In file included from ../../gnulib/import/stdlib.h:100,
from ../../../sim/ppc/hw_memory.c:28:
../../gnulib/import/unistd.h:663:3: error: #error "Please include config.h first."
663 | #error "Please include config.h first."
| ^~~~~
../../gnulib/import/unistd.h:665:24: error: expected ‘;’ before ‘extern’
665 | _GL_INLINE_HEADER_BEGIN
| ^
| ;
../../gnulib/import/unistd.h:2806:22: error: expected ‘;’ before ‘extern’
2806 | _GL_INLINE_HEADER_END
| ^
| ;
---
sim/ppc/hw_memory.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sim/ppc/hw_memory.c b/sim/ppc/hw_memory.c
index 46b22f7b6e3..2376be6730b 100644
--- a/sim/ppc/hw_memory.c
+++ b/sim/ppc/hw_memory.c
@@ -25,6 +25,9 @@
#define STATIC_INLINE_HW_MEMORY STATIC_INLINE
#endif
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdlib.h>
#include "device_table.h"
--
2.33.0.882.g93a45727a2-goog
next reply other threads:[~2021-10-08 20:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-08 20:16 Christian Biesinger via Gdb-patches [this message]
2021-10-09 1:16 ` Mike Frysinger via Gdb-patches
2021-10-28 19:09 ` Christian Biesinger via Gdb-patches
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=20211008201657.630932-1-cbiesinger@google.com \
--to=gdb-patches@sourceware.org \
--cc=cbiesinger@chromium.org \
--cc=cbiesinger@google.com \
/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