mirror of
https://github.com/fairwaves/openbts-2.8.git
synced 2025-11-02 13:03:14 +00:00
From b453f10d65dd1ff1df0dd3747adf63f4e1fd7d30 Mon Sep 17 00:00:00 2001
From: Alexander Chemeris <Alexander.Chemeris@gmail.com> Date: Sun, 16 Dec 2012 17:44:10 +0400 Subject: [PATCH] Use gethostbyname2_r() instead of gethostbyname() if available. gethostbyname() is not thread-safe. It's recommended to use gethostbyname_r() or gethostbyname2_r() instead. --- CommonLibs/Sockets.cpp | 44 +++++++++++++++++++++++++++++++++----------- configure.ac | 4 ++++ 2 files changed, 37 insertions(+), 11 deletions(-) git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4637 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
@@ -130,6 +130,10 @@ PKG_CHECK_MODULES(LIBUSB, libusb-1.0)
|
||||
# Prepends -lreadline to LIBS and defines HAVE_LIBREADLINE in config.h
|
||||
AC_CHECK_LIB(readline, readline)
|
||||
|
||||
# Check for glibc-specific network functions
|
||||
AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAVE_GETHOSTBYNAME_R, 1, Define if libc implements gethostbyname_r)])
|
||||
AC_CHECK_FUNC(gethostbyname2_r, [AC_DEFINE(HAVE_GETHOSTBYNAME2_R, 1, Define if libc implements gethostbyname2_r)])
|
||||
|
||||
dnl Output files
|
||||
AC_CONFIG_FILES([\
|
||||
Makefile \
|
||||
|
||||
Reference in New Issue
Block a user