From 489f4fe0570f7bab6f9211f64404a2c5ac1591b5 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Mon, 14 Jul 2025 13:59:00 +0100 Subject: [PATCH] tile.h: move #include into tile.c tile.h is included by a large part of the project, but the definitions in sys/mman.h are only needed by the implementation code inside tile.c so this reduces project wide include dependencies. --- tiles/tile.c | 3 +++ tiles/tile.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tiles/tile.c b/tiles/tile.c index 696fff76..7ea2f172 100644 --- a/tiles/tile.c +++ b/tiles/tile.c @@ -23,6 +23,9 @@ static const char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magi #include #include #include +#ifdef HAVE_SYS_MMAN_H +#include +#endif #include "utils/magic.h" #include "utils/malloc.h" diff --git a/tiles/tile.h b/tiles/tile.h index a4d63525..b876a346 100644 --- a/tiles/tile.h +++ b/tiles/tile.h @@ -76,8 +76,6 @@ typedef struct tile */ #ifdef HAVE_SYS_MMAN_H -#include -#include /* This is an on-demand Free List management */ typedef Tile *TileStore;