]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Correct compile error in watch_socket_unittests.cc under Solaris
authorThomas Markwalder <tmark@isc.org>
Tue, 25 Feb 2014 20:54:02 +0000 (15:54 -0500)
committerThomas Markwalder <tmark@isc.org>
Tue, 25 Feb 2014 20:54:02 +0000 (15:54 -0500)
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.

configure.ac
src/lib/dhcp_ddns/tests/watch_socket_unittests.cc

index 1c239a325962a48ff5690a35310ecdb6cd19e354..3d7fd054a6057a44e7e0377aca85185f24e95c66 100644 (file)
@@ -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" != "")
 
index e19b8cbe21c7401f760941bc3b743be167438e9c..059767f9ca19dc7e73b8f6fb8e901269530a9405 100644 (file)
@@ -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 <config.h>
 #include <dhcp_ddns/watch_socket.h>
 #include <test_utils.h>
 
 #include <sys/select.h>
 #include <sys/ioctl.h>
 
+#ifdef HAVE_SYS_FILIO_H
+// FIONREAD is here on Solaris
+#include <sys/filio.h>
+#endif
+
 using namespace std;
 using namespace isc;
 using namespace isc::dhcp_ddns;