From 90c6770d0e18bf977fa47e0a65940eb3e088ed29 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 15 Mar 2024 17:18:07 +0100 Subject: [PATCH] (submit/bsd-DEV_MEM) xfree86: os-support: unexport DEV_MEM defines DEV_MEM define isn't used by any drivers, and BSD seems to be the only platform using /dev/pmem instead of /dev/mem - as well as the DEV_MEM define from xf86_OSlib.h (Linux uses the symbol, but defines on its own) Therefore, just define it where actually used and drop it from the global xf86OSlib.h file. Note that /dev/pmem refers to physical memory, not to be mixed up with Linux's persistent memory subsys, which uses /dev/pmem[N] device nodes. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/os-support/bsd/alpha_video.c | 2 ++ hw/xfree86/os-support/bsd/arm_video.c | 2 ++ hw/xfree86/os-support/bsd/i386_video.c | 2 ++ hw/xfree86/os-support/xf86_OSlib.h | 7 ------- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c index 279391e42..523c76430 100644 --- a/hw/xfree86/os-support/bsd/alpha_video.c +++ b/hw/xfree86/os-support/bsd/alpha_video.c @@ -42,6 +42,8 @@ #include "xf86_os_support.h" #include "xf86_OSlib.h" +#define DEV_MEM "/dev/pmem" + #if defined(__NetBSD__) && !defined(MAP_FILE) #define MAP_FLAGS MAP_SHARED #else diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c index 15b12a86f..2abf9bf44 100644 --- a/hw/xfree86/os-support/bsd/arm_video.c +++ b/hw/xfree86/os-support/bsd/arm_video.c @@ -70,6 +70,8 @@ #include "xf86_OSlib.h" #include "compiler.h" +#define DEV_MEM "/dev/pmem" + #if defined(__NetBSD__) && !defined(MAP_FILE) #define MAP_FLAGS MAP_SHARED #else diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c index 607e4ca2b..9dca7f229 100644 --- a/hw/xfree86/os-support/bsd/i386_video.c +++ b/hw/xfree86/os-support/bsd/i386_video.c @@ -40,6 +40,8 @@ #include #endif +#define DEV_MEM "/dev/pmem" + #if defined(__NetBSD__) && !defined(MAP_FILE) #define MAP_FLAGS MAP_SHARED #else diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h index 0fe9a8ec5..e79d7fa92 100644 --- a/hw/xfree86/os-support/xf86_OSlib.h +++ b/hw/xfree86/os-support/xf86_OSlib.h @@ -111,9 +111,6 @@ #endif /* !VT_ACKACQ */ #if defined(SVR4) -#if !(defined(__sun) && defined (SVR4)) -#define DEV_MEM "/dev/pmem" -#endif #define CLEARDTR_SUPPORT #endif /* SVR4 */ @@ -242,10 +239,6 @@ struct pcvtid { #include -#ifndef DEV_MEM -#define DEV_MEM "/dev/mem" -#endif - #ifndef MAP_FAILED #define MAP_FAILED ((void *)-1) #endif