]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 298051 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 10 Dec 2010 16:28:14 +0000 (16:28 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 10 Dec 2010 16:28:14 +0000 (16:28 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r298051 | tilghman | 2010-12-10 10:26:46 -0600 (Fri, 10 Dec 2010) | 18 lines

  Merged revisions 298050 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2

  ........
    r298050 | tilghman | 2010-12-10 10:24:13 -0600 (Fri, 10 Dec 2010) | 11 lines

    Portability issue on OpenSolaris.

    Also detect the required structure element, because OpenSolaris defines
    SIOCGIFHWADDR, but without support for IP sockets.

    (closes issue #18442)
     Reported by: ranjtech
     Patches:
           20101209__issue18442.diff.txt uploaded by tilghman (license 14)
     Tested by: ranjtech
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298052 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configure
configure.ac
include/asterisk/autoconfig.h.in
main/netsock.c

index 13069d4d3059d740521929ef024dcb924e3f7cd7..c7cd5e893fc96c1d8777e598ee75fc516eb7a5b4 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 294431 .
+# From configure.ac Revision: 296535 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.65 for asterisk trunk.
 #
@@ -12732,6 +12732,17 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+fi
+
+ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_ifru.ifru_hwaddr" "ac_cv_member_struct_ifreq_ifr_ifru_ifru_hwaddr" "#include <net/if.h>
+"
+if test "x$ac_cv_member_struct_ifreq_ifr_ifru_ifru_hwaddr" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR 1
+_ACEOF
+
+
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
index ee27cebd8dc5350384002d397f828e2c37a29e29..96139894296a399ac01b4b714481f99c0a78b2fb 100644 (file)
@@ -490,6 +490,7 @@ AC_TYPE_PID_T
 AC_TYPE_SIZE_T
 AC_CHECK_MEMBERS([struct stat.st_blksize])
 AC_CHECK_MEMBERS([struct ucred.uid, struct ucred.cr_uid], [], [], [#include <sys/socket.h>])
+AC_CHECK_MEMBERS([struct ifreq.ifr_ifru.ifru_hwaddr], [], [], [#include <net/if.h>])
 AC_HEADER_TIME
 AC_STRUCT_TM
 AC_C_VOLATILE
index 94dde0b31db693d9c69cb62b1432631ab66b6783..2ec7b7ed816a884893c3ad4f760b0fecdf0eb2cf 100644 (file)
 /* Define to 1 if you have the `strtoq' function. */
 #undef HAVE_STRTOQ
 
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
+#undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
+
 /* Define to 1 if `st_blksize' is a member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
index b6dfc6e9cd96db7de0f8bdeb2cfc3a648337c88d..5cab1c19a488f9004e81460e4dc7155ea279ba8e 100644 (file)
@@ -236,7 +236,7 @@ char *ast_eid_to_str(char *s, int maxlen, struct ast_eid *eid)
 
 void ast_set_default_eid(struct ast_eid *eid)
 {
-#if defined(SIOCGIFHWADDR)
+#if defined(SIOCGIFHWADDR) && defined(HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR)
        int s, x = 0;
        char eid_str[20];
        struct ifreq ifr;