From fbb7e17946c91cd8d8489d595d01b685da8c3d00 Mon Sep 17 00:00:00 2001 From: Dmitry Kurochkin Date: Mon, 22 Aug 2011 22:33:49 +0400 Subject: [PATCH] Fix build errors when IpcIo DiskIO module is disabled. Add USE_DISKIO_IPCIO configuration macro and do not build IpcIo-related Ipc::Strand code when the DiskIO module is disabled. --- configure.ac | 1 + src/ipc/Strand.cc | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a9cdd23279..abce95bb4e 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/src/ipc/Strand.cc b/src/ipc/Strand.cc index 20db46b74a..3b8a39c12a 100644 --- a/src/ipc/Strand.cc +++ b/src/ipc/Strand.cc @@ -18,9 +18,11 @@ #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); -- 2.47.3