[Xfce4-commits] <xfce4-weather-plugin:master> Get the plugin working on OpenBSD (bug #9152).

Harald Judt noreply at xfce.org
Wed Jul 25 08:22:01 CEST 2012


Updating branch refs/heads/master
         to 94c7c6e88ed7caf1ed8fec608558050274064a84 (commit)
       from a7eafaaac94476c0a6143ded7883b5bf5b82d9f3 (commit)

commit 94c7c6e88ed7caf1ed8fec608558050274064a84
Author: Landry Breuil <landry at xfce.org>
Date:   Wed Jul 25 08:19:10 2012 +0200

    Get the plugin working on OpenBSD (bug #9152).
    
    Without the second #define, the plugin will crash on OpenBSD.
    Let's comment this so that others don't make the mistake of
    accidentally moving the #defines around.

 panel-plugin/weather-parsers.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index 6442d42..d574df2 100644
--- a/panel-plugin/weather-parsers.c
+++ b/panel-plugin/weather-parsers.c
@@ -15,12 +15,15 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#define _XOPEN_SOURCE
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+/* The following two defines fix compile warnings and need to be
+ * before time.h and libxfce4panel.h (which includes glib.h).
+ * Otherwise, they will be ignored. */
+#define _XOPEN_SOURCE
+#define _XOPEN_SOURCE_EXTENDED 1
 #include "weather-parsers.h"
 #include <libxfce4panel/libxfce4panel.h>
 #include <time.h>


More information about the Xfce4-commits mailing list