ZOOKEEPER-2841 I fixed the inclusion of project-specific porting changes that were included in the public headers, which then broke upstream projects (in my case, Mesos).
Unfortunately, I inadvertently created the exact same problem for Linux (or really any system that uses Autotools), and it wasn't evident until the build was coupled with another project with the same problem. More specifically, when including ZooKeeper (with my changes) in Mesos, and including Google's Glog in Mesos, and building both with Autotools (which we also support), both packages define the pre-processor macro PACKAGE_VERSION, and so so publicly. This is defined in config.h by Autotools, and is not a problem unless included publicly.
When refactoring, I saw two includes in zookeeper.h that instead of being guarded by e.g. #ifdef HAVE_SYS_SOCKET_H were guarded by #ifndef WIN32. Without realizing that I would create the exact same problem I was elsewhere fixing, I erroneously added #include "config.h" and guarded the includes "properly." But there is very good reasons not to do this (explained above).
The patch to fix this is simple:
I am opening pull requests in a few minutes to have this applied to branch 3.4 and 3.5.