]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
proper gethostebyname_r detection
authorMichael Jerris <mike@jerris.com>
Sun, 16 Mar 2008 23:43:56 +0000 (23:43 +0000)
committerMichael Jerris <mike@jerris.com>
Sun, 16 Mar 2008 23:43:56 +0000 (23:43 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@421 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/configure.ac
libs/freetdm/src/ss7_boost_client.c

index ffe599eb37e268f876e66b31ee68729b78583c46..2931a4f2621d3b6427911f73d0c1781dba57686a 100644 (file)
@@ -45,7 +45,8 @@ sun)
     ;;
 esac
 
-AC_CHECK_HEADERS([netinet/sctp.h])
+AC_CHECK_HEADERS([netinet/sctp.h netdb.h])
+AC_CHECK_FUNCS([gethostbyname_r]) 
 
 #  Enable debugging
 AC_ARG_ENABLE(debug,
index dc0151e2ab2a3f87e4a46a874bab45121b064e15..d2ec25d5973ef0b9c539dd501f9f95ca5ab925d8 100644 (file)
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
+#if HAVE_NETDB_H
+#include <netdb.h>
+#endif
+
 #include "openzap.h"
 #include <ss7_boost_client.h>
 
-#ifndef gethostbyname_r
-extern int gethostbyname_r (__const char *__restrict __name,
-                                                       struct hostent *__restrict __result_buf,
-                                                       char *__restrict __buf, size_t __buflen,
-                                                       struct hostent **__restrict __result,
-                                                       int *__restrict __h_errnop);
+
+#ifndef HAVE_GETHOSTBYNAME_R
+extern int gethostbyname_r (const char *__name,
+                                                       struct hostent *__result_buf,
+                                                       char *__buf, size_t __buflen,
+                                                       struct hostent **__result,
+                                                       int *__h_errnop);
 #endif
 
 struct ss7bc_map {