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/branches/1.8@298051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2010-12-10 16:26:46 +00:00
parent 7310e07564
commit 5c50b497f5
4 changed files with 17 additions and 2 deletions

13
configure vendored
View File

@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# From configure.ac Revision: 294430 . # From configure.ac Revision: 296534 .
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for asterisk trunk. # Generated by GNU Autoconf 2.65 for asterisk trunk.
# #
@@ -12729,6 +12729,17 @@ cat >>confdefs.h <<_ACEOF
_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 fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5

View File

@@ -487,6 +487,7 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
AC_CHECK_MEMBERS([struct stat.st_blksize]) 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 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_HEADER_TIME
AC_STRUCT_TM AC_STRUCT_TM
AC_C_VOLATILE AC_C_VOLATILE

View File

@@ -813,6 +813,9 @@
/* Define to 1 if you have the `strtoq' function. */ /* Define to 1 if you have the `strtoq' function. */
#undef HAVE_STRTOQ #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'. */ /* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE #undef HAVE_STRUCT_STAT_ST_BLKSIZE

View File

@@ -234,7 +234,7 @@ char *ast_eid_to_str(char *s, int maxlen, struct ast_eid *eid)
void ast_set_default_eid(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; int s, x = 0;
char eid_str[20]; char eid_str[20];
struct ifreq ifr; struct ifreq ifr;