From: Thomas Markwalder Date: Tue, 25 Feb 2014 20:54:02 +0000 (-0500) Subject: [master] Correct compile error in watch_socket_unittests.cc under Solaris X-Git-Tag: bind10-1.2.0beta1-release~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10fa44e191cc2604e446068ef4325fe5b059dddb;p=thirdparty%2Fkea.git [master] Correct compile error in watch_socket_unittests.cc under Solaris Solaris defines FIONREAD, used in unit test is dhcp_ddns/watch_socket_unittests.cc in sys/filio.h. Added header check for this file to configure.ac and use of HAVE_SYS_FILIO_H in the unit test source. --- diff --git a/configure.ac b/configure.ac index 1c239a3259..3d7fd054a6 100644 --- a/configure.ac +++ b/configure.ac @@ -910,6 +910,9 @@ if test "$MYSQL_CONFIG" != "" ; then AC_DEFINE([HAVE_MYSQL], [1], [MySQL is present]) fi +# Solaris puts FIONREAD in filio.h +AC_CHECK_HEADERS(sys/filio.h,,,) + # ... and at the shell level, so Makefile.am can take action depending on this. AM_CONDITIONAL(HAVE_MYSQL, test "$MYSQL_CONFIG" != "") diff --git a/src/lib/dhcp_ddns/tests/watch_socket_unittests.cc b/src/lib/dhcp_ddns/tests/watch_socket_unittests.cc index e19b8cbe21..059767f9ca 100644 --- a/src/lib/dhcp_ddns/tests/watch_socket_unittests.cc +++ b/src/lib/dhcp_ddns/tests/watch_socket_unittests.cc @@ -11,7 +11,7 @@ // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. - +#include #include #include @@ -20,6 +20,11 @@ #include #include +#ifdef HAVE_SYS_FILIO_H +// FIONREAD is here on Solaris +#include +#endif + using namespace std; using namespace isc; using namespace isc::dhcp_ddns;