]> git.ipfire.org Git - thirdparty/squid.git/commit - src/defines.h
Fix "address.GetPort() != 0" assertion for helpers on FreeBSD (at least).
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 12 Jan 2013 18:34:10 +0000 (11:34 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sat, 12 Jan 2013 18:34:10 +0000 (11:34 -0700)
commit5b34651543933a237a0f70aa0c69f708cf62168a
tree67b3c4f1c3b5c58b3b987490621908968ec50a0a
parentbca20999278ceb2aca89c46634fe55fe7cf26b6c
Fix "address.GetPort() != 0" assertion for helpers on FreeBSD (at least).

The order (or set of?) #include files used by src/ssl/helper.cc (and
probably by other helper source files) has changed recently, exposing a
defines.h dependency on sys/socket.h where that system header is
required to define AF_UNIX. With AF_UNIX incorrectly undefined,
IPC_STREAM was set to IPC_TCP_SOCKET instead of IPC_UNIX_STREAM, and
helpers that do not have a notion of a listening port, were trying to
create communication sockets using TCP streams, triggering a "must have
a port" assertion in comm_connect_addr() called from ipcCreate().

TODO: Moving IPC_* defines into an IPC-specific header file may be a
better solution then exposing all defines.h users to sys/socket.h.
src/defines.h