common: disable journald logging backend if struct msghdr is not found#40607
common: disable journald logging backend if struct msghdr is not found#40607tchaikov merged 1 commit intoceph:masterfrom
Conversation
2053592 to
f7a354e
Compare
|
@petrutlucian94 sorry for breaking the win32 build. this change should fix it. |
thanks for solving the issue! |
* cmake/modules/CephChecks.cmake: detect the existence of struct msghdr, define HAVE_MSGHDR if it is found * src/common/CMakeLists.txt: do not compile journald.cc if HAVE_MSGHDR is FALSE. as in that case, we cannot use sendmsg() to write to journald unix domain socket * src/test/CMakeLists.txt, src/test/common/CMakeLists.txt: disable test exercising journald logging backend if HAVE_MSGHDR is not defined * src/common/Journald.h: define a dummy JournaldLogger and a dummy JournaldClusterLogger when HAVE_MSGHDR is not defined, in order to minimize the change in Log.h and Log.cc, otherwise the source code of Log.h and Log.cc would be segmented into smaller chunks by `ifdef HAVE_MSGHDR` macros. * src/include/config-h.in.cmake: define a new macro named HAVE_MSGHDR. Signed-off-by: Kefu Chai <[email protected]>
f7a354e to
80c4a1c
Compare
|
@tchaikov |
could you be more specific on "all sorts of undefined constants" ?
i'd suggest check on some specific libraries/header/struct instead of distro or kernel, unless some certain feature really depends on distro/kernel. |
So perhaps a test on the availability |
|
i see, i will replace the |
|
@tchaikov |
define HAVE_MSGHDR if it is found
is FALSE. as in that case, we cannot use sendmsg() to write to
journald unix domain socket
JournaldClusterLogger when HAVE_MSGHDR is not defined, in order to
minimize the change in Log.h and Log.cc, otherwise the source code of
Log.h and Log.cc would be segmented into smaller chunks by
ifdef HAVE_MSGHDRmacros.HAVE_MSGHDR.
Signed-off-by: Kefu Chai [email protected]
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox