]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix build errors when IpcIo DiskIO module is disabled.
authorDmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Mon, 22 Aug 2011 18:33:49 +0000 (22:33 +0400)
committerDmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Mon, 22 Aug 2011 18:33:49 +0000 (22:33 +0400)
Add USE_DISKIO_IPCIO configuration macro and do not build
IpcIo-related Ipc::Strand code when the DiskIO module is disabled.

configure.ac
src/ipc/Strand.cc

index a9cdd23279c5996396aee808e4955addfc87a5e7..abce95bb4e0b13f3da6d5f0996528773a949b2ee 100644 (file)
@@ -672,6 +672,7 @@ for module in $squid_disk_module_candidates none; do
       DISK_LIBS="$DISK_LIBS libIpcIo.a"
       DISK_MODULES="$DISK_MODULES IpcIo"
       DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/IpcIo/IpcIoDiskIOModule.o"
+      AC_DEFINE(USE_DISKIO_IPCIO, 1, [Enable DiskIO IpcIo module.])
       ;;
 
     Blocking)
index 20db46b74a09bd489339fc72bcb30415ff16add6..3b8a39c12a449ba7072594ce531856a310e22ccd 100644 (file)
 #include "mgr/Request.h"
 #include "mgr/Response.h"
 #include "mgr/Forwarder.h"
-#include "DiskIO/IpcIo/IpcIoFile.h" /* XXX: scope boundary violation */
 #include "SwapDir.h" /* XXX: scope boundary violation */
 #include "CacheManager.h"
+#if USE_DISKIO_IPCIO
+#include "DiskIO/IpcIo/IpcIoFile.h" /* XXX: scope boundary violation */
+#endif
 #if SQUID_SNMP
 #include "snmp/Forwarder.h"
 #include "snmp/Request.h"
@@ -67,6 +69,7 @@ void Ipc::Strand::receive(const TypedMsgHdr &message)
         SharedListenJoined(SharedListenResponse(message));
         break;
 
+#if USE_DISKIO_IPCIO
     case mtStrandSearchResponse:
         IpcIoFile::HandleOpenResponse(StrandSearchResponse(message));
         break;
@@ -74,6 +77,7 @@ void Ipc::Strand::receive(const TypedMsgHdr &message)
     case mtIpcIoNotification:
         IpcIoFile::HandleNotification(message);
         break;
+#endif /* USE_DISKIO_IPCIO */
 
     case mtCacheMgrRequest: {
         const Mgr::Request req(message);