[FYI] Fix scoped_mmap includes

Message ID 20190507030101.30956-1-tom@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey May 7, 2019, 3:01 a.m. UTC
  I noticed that scoped_mmap.h included config.h, and that scoped_mmap.c
included defs.h.  This patch fixes both of these problems.

Tested by the buildbot.

gdb/ChangeLog
2019-05-06  Tom Tromey  <tom@tromey.com>

	* common/scoped_mmap.c: Include common-defs.h.
	* common/scoped_mmap.h: Don't include config.h.
---
 gdb/ChangeLog            | 5 +++++
 gdb/common/scoped_mmap.c | 2 +-
 gdb/common/scoped_mmap.h | 2 --
 3 files changed, 6 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gdb/common/scoped_mmap.c b/gdb/common/scoped_mmap.c
index 1bd980c09a5..19175e4a919 100644
--- a/gdb/common/scoped_mmap.c
+++ b/gdb/common/scoped_mmap.c
@@ -17,7 +17,7 @@ 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "defs.h"
+#include "common-defs.h"
 #include "scoped_mmap.h"
 #include "scoped_fd.h"
 #include "common/filestuff.h"
diff --git a/gdb/common/scoped_mmap.h b/gdb/common/scoped_mmap.h
index 0b504c96fec..05cca9efa7d 100644
--- a/gdb/common/scoped_mmap.h
+++ b/gdb/common/scoped_mmap.h
@@ -20,8 +20,6 @@ 
 #ifndef COMMON_SCOPED_MMAP_H
 #define COMMON_SCOPED_MMAP_H
 
-#include "config.h"
-
 #ifdef HAVE_SYS_MMAN_H
 
 #include <sys/mman.h>