From: Eric Bollengier Date: Thu, 3 Mar 2011 14:31:15 +0000 (+0100) Subject: Fix QT tray monitor compilation on windows X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0bd93b7e3a14c6d68cf82d9f6b9f569d69a9fc28;p=bacula%2Fbacula Fix QT tray monitor compilation on windows --- 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 diff --git a/bacula/src/win32/compat/compat.h b/bacula/src/win32/compat/compat.h index c11c3b06e5..df78ec4375 100644 --- a/bacula/src/win32/compat/compat.h +++ b/bacula/src/win32/compat/compat.h @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2004-2010 Free Software Foundation Europe e.V. + Copyright (C) 2004-2011 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -40,8 +40,11 @@ #if !defined(__COMPAT_H_) #define __COMPAT_H_ #if !defined(_STAT_H) -#define _STAT_H /* don't pull in MinGW stat.h */ -#define _STAT_DEFINED /* don't pull in MinGW stat.h */ +#define _STAT_H /* don't pull in MinGW stat.h */ +#endif + +#ifndef _STAT_DEFINED +#define _STAT_DEFINED 1 /* don't pull in MinGW struct stat from wchar.h */ #endif #if defined(_MSC_VER) && (_MSC_VER >= 1400) // VC8+