From e3846eb096a7ded4566775bcca0a3e3ceb22f762 Mon Sep 17 00:00:00 2001 From: William Wold Date: Sat, 26 Jan 2019 04:56:06 -0500 Subject: xstuff: Error if X11 not enabled --- mate-panel/xstuff.c | 6 ++++++ mate-panel/xstuff.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/mate-panel/xstuff.c b/mate-panel/xstuff.c index 21d58825..199b8620 100644 --- a/mate-panel/xstuff.c +++ b/mate-panel/xstuff.c @@ -12,7 +12,13 @@ * Copyright (c) 1997-2002 Alfredo K. Kojima */ + #include + +#ifndef HAVE_X11 +#error file should only be built when HAVE_X11 is enabled +#endif + #include #include diff --git a/mate-panel/xstuff.h b/mate-panel/xstuff.h index 83af4645..0bf29738 100644 --- a/mate-panel/xstuff.h +++ b/mate-panel/xstuff.h @@ -1,9 +1,17 @@ #ifndef __XSTUFF_H__ #define __XSTUFF_H__ +#ifdef PACKAGE_NAME // only check HAVE_X11 if config.h has been included +#ifndef HAVE_X11 +#error file should only be included when HAVE_X11 is enabled +#endif +#endif + #include #include +#include "panel-enums-gsettings.h" + void xstuff_zoom_animate (GtkWidget *widget, cairo_surface_t *surface, PanelOrientation orientation, -- cgit v1.2.1