[balsa] Fix bgo #704159 (Igor Pashev)



commit c66fe46cf768e300ccbba119c329292c6fcaf114
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun Jul 14 10:58:43 2013 -0400

    Fix bgo #704159 (Igor Pashev)
    
        * configure.ac: add check for struct utsname.domainname, and
        AC_USE_SYSTEM_EXTENSIONS.
        * libbalsa/filter-file.c: do not define __EXTENSIONS__.
        * libbalsa/send.c (libbalsa_set_message_id): check
        HAVE_STRUCT_UTSNAME_DOMAINNAME as well as _GNU_SOURCE.

 ChangeLog              |   10 ++++++++++
 configure.in           |    2 ++
 libbalsa/filter-file.c |    2 --
 libbalsa/send.c        |    2 +-
 4 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1592ce7..4f88375 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-07-14  Peter Bloomfield
+
+       Fix bgo #704159 (Igor Pashev)
+
+       * configure.ac: add check for struct utsname.domainname, and
+       AC_USE_SYSTEM_EXTENSIONS.
+       * libbalsa/filter-file.c: do not define __EXTENSIONS__.
+       * libbalsa/send.c (libbalsa_set_message_id): check
+       HAVE_STRUCT_UTSNAME_DOMAINNAME as well as _GNU_SOURCE.
+
 2013-02-14  Pawel Salek
 
        * NEWS, configure.in: release balsa-2.4.14 buildable on fedora rawhide.
diff --git a/configure.in b/configure.in
index 59cf164..d188dbe 100644
--- a/configure.in
+++ b/configure.in
@@ -202,6 +202,8 @@ dnl #####################################################################
 AC_PROG_CC
 m4_ifdef([AM_PROG_LIBTOOL],[AM_PROG_LIBTOOL],[AC_PROG_RANLIB])
 AC_PROG_LN_S
+AC_USE_SYSTEM_EXTENSIONS
+AC_CHECK_MEMBERS([struct utsname.domainname],[],[],[[#include<sys/utsname.h>]])
 
 # pkg-config
 #
diff --git a/libbalsa/filter-file.c b/libbalsa/filter-file.c
index b9b2ccc..b244b5d 100644
--- a/libbalsa/filter-file.c
+++ b/libbalsa/filter-file.c
@@ -32,8 +32,6 @@
 #endif                          /* HAVE_CONFIG_H */
 #include "filter-file.h"
 
-/* extensions  needed additonally on Solaris for strptime */
-#define __EXTENSIONS__
 #include <stdlib.h>
 #include <stdio.h>
 /* yellow dog has crappy libc and needs pthread.h to be included here */
diff --git a/libbalsa/send.c b/libbalsa/send.c
index e5970b9..4d7761e 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -2014,7 +2014,7 @@ libbalsa_set_message_id(GMimeMessage * mime_message)
     struct utsname utsbuf;
     gchar *host = "localhost";
     gchar *message_id;
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) && defined(HAVE_STRUCT_UTSNAME_DOMAINNAME)
     gchar *fqdn;
     gchar *domain = "localdomain";
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]