]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] (re)make sure to {un,}define USE_SHARED_MEMORY in config.h
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 16 May 2013 17:30:34 +0000 (10:30 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 16 May 2013 17:30:34 +0000 (10:30 -0700)
this chunk was accidentally removed in e448bbba3ecae68b261612954aa9777edc384be4
causing test faiulres.

configure.ac
src/bin/xfrout/xfrout.py.in

index 356d60fefbdf07a19d6be393f254ebc4735fa50b..af9a6026120c414d499e0e1e9a55d374532f5b42 100644 (file)
@@ -891,6 +891,9 @@ if test X$use_shared_memory = Xyes -a "$BOOST_MAPPED_FILE_WOULDFAIL" = "yes"; th
     AC_MSG_ERROR([Boost shared memory does not compile on this system.  If you don't need it (most normal users won't) build without it by rerunning this script with --without-shared-memory; using a different compiler or a different version of Boost may also help.])
 fi
 AM_CONDITIONAL([USE_SHARED_MEMORY], [test x$use_shared_memory = xyes])
+if test "x$use_shared_memory" = "xyes"; then
+    AC_DEFINE(USE_SHARED_MEMORY, 1, [Define to 1 if shared memory support is enabled])
+fi
 AC_SUBST(BOOST_MAPPED_FILE_CXXFLAG)
 
 # Add some default CPP flags needed for Boost, identified by the AX macro.
index 1863ad04be5ea7b6dd7604841c86b5e3ee1303a3..ab6d091fbbfb8a0344cec8b6c37ed248bfb5b236 100755 (executable)
@@ -152,6 +152,14 @@ def get_soa_serial(soa_rdata):
     '''
     return Serial(int(soa_rdata.to_text().split()[2]))
 
+def make_blocking(fd, on=True):
+    flags = fcntl.fcntl(fd, fcntl.F_GETFL)
+    if on:                      # make it blocking
+        flags &= ~os.O_NONBLOCK
+    else:                       # make it non blocking
+        flags |= os.O_NONBLOCK
+    fcntl.fcntl(fd, fcntl.F_SETFL, flags)
+
 class XfroutSession():
     def __init__(self, sock_fd, request_data, server, tsig_key_ring, remote,
                  default_acl, zone_config, client_class=DataSourceClient):