From 8312d4da17b64d63f9839f08009cbab5401bc6a0 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 3 Mar 2011 15:31:15 +0100 Subject: [PATCH] Fix QT tray monitor compilation on windows --- bacula/src/qt-console/tray-monitor/tray-monitor.cpp | 1 - bacula/src/qt-console/tray-monitor/tray-monitor.h | 8 ++++++++ bacula/src/qt-console/tray-monitor/tray-ui.h | 8 +++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bacula/src/qt-console/tray-monitor/tray-monitor.cpp b/bacula/src/qt-console/tray-monitor/tray-monitor.cpp index 345a535545..cd38ad75be 100644 --- a/bacula/src/qt-console/tray-monitor/tray-monitor.cpp +++ b/bacula/src/qt-console/tray-monitor/tray-monitor.cpp @@ -27,7 +27,6 @@ */ #include "tray-ui.h" -#include "tray-monitor.h" int doconnect(monitoritem* item); int docmd(monitoritem* item, const char* command); diff --git a/bacula/src/qt-console/tray-monitor/tray-monitor.h b/bacula/src/qt-console/tray-monitor/tray-monitor.h index 7eba3dfe75..ac2c2578e3 100644 --- a/bacula/src/qt-console/tray-monitor/tray-monitor.h +++ b/bacula/src/qt-console/tray-monitor/tray-monitor.h @@ -35,12 +35,20 @@ #ifndef TRAY_MONITOR_H #define TRAY_MONITOR_H +#ifdef HAVE_WIN32 +# ifndef _STAT_DEFINED +# define _STAT_DEFINED 1 /* don't pull in MinGW struct stat from wchar.h */ +# endif +#endif + #include #include + #include "bacula.h" #include "tray_conf.h" #include "jcr.h" + struct job_defaults { QString job_name; QString pool_name; diff --git a/bacula/src/qt-console/tray-monitor/tray-ui.h b/bacula/src/qt-console/tray-monitor/tray-ui.h index f6972f302a..1119e26f16 100644 --- a/bacula/src/qt-console/tray-monitor/tray-ui.h +++ b/bacula/src/qt-console/tray-monitor/tray-ui.h @@ -30,6 +30,12 @@ #ifndef TRAYUI_H #define TRAYUI_H +#ifdef HAVE_WIN32 +# ifndef _STAT_DEFINED +# define _STAT_DEFINED 1 /* don't pull in MinGW struct stat from wchar.h */ +# endif +#endif + #include #include #include @@ -50,11 +56,11 @@ #include #include #include + #include "version.h" #include "ui/ui_run.h" #include "tray-monitor.h" - class RunDlg: public QDialog, public Ui::runForm { Q_OBJECT -- 2.39.5