]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix QT tray monitor compilation on windows
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 3 Mar 2011 14:31:15 +0000 (15:31 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 3 Mar 2011 14:50:42 +0000 (15:50 +0100)
bacula/src/qt-console/tray-monitor/tray-monitor.cpp
bacula/src/qt-console/tray-monitor/tray-monitor.h
bacula/src/qt-console/tray-monitor/tray-ui.h
bacula/src/win32/compat/compat.h

index 345a535545efb277592014ed3e9035388e43eee2..cd38ad75bee7976087ba2a8b1c5ffcd0b4889308 100644 (file)
@@ -27,7 +27,6 @@
 */
 
 #include "tray-ui.h"
-#include "tray-monitor.h"
 
 int doconnect(monitoritem* item);
 int docmd(monitoritem* item, const char* command);
index 7eba3dfe7565bf67bc84b1549f9f068bb7f4f34d..ac2c2578e3e3639e5b831c61b200931c76bf0838 100644 (file)
 #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 <QString>
 #include <QStringList>
+
 #include "bacula.h"
 #include "tray_conf.h"
 #include "jcr.h"
 
+
 struct job_defaults {
    QString job_name;
    QString pool_name;
index f6972f302a5927e7e729b6be20a4d5fdd7bcdc1c..1119e26f16f268203ff7d5142b6bbb2142089e9c 100644 (file)
 #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 <QAction>
 #include <QApplication>
 #include <QButtonGroup>
 #include <QDebug>
 #include <QMessageBox>
 #include <QFont>
+
 #include "version.h"
 #include "ui/ui_run.h"
 #include "tray-monitor.h"
 
-
 class RunDlg: public QDialog, public Ui::runForm
 {
    Q_OBJECT
index c11c3b06e5c2c7ff8c0f7bb8c3efffc03bf08eee..df78ec437541e82c568f7c6e00f9240b47067121 100644 (file)
@@ -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.
 #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+