]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
log: fix stderr handling on Windows 49277/head
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 6 Dec 2022 08:35:36 +0000 (10:35 +0200)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 6 Dec 2022 12:56:02 +0000 (14:56 +0200)
commitb7a7debb87a3da3af2f67dae02f56f3de26d11a9
tree9dbf7682b8c8194fa7c72f598e39d3ac2a368dde
parentc297b97cfe3c94854dc0d2db8608d812d6011474
log: fix stderr handling on Windows

A recent commit configured stderr to use non-blocking IO in
order to avoid partial writes with container runtimes.

This broke the Windows build:

ceph/src/log/Log.cc:85:36: error: 'F_GETFL' was not declared in this scope
   85 |     int flags = fcntl(m_fd_stderr, F_GETFL);
      |                                    ^~~~~~~
ceph/src/log/Log.cc:85:17: error: 'fcntl' was not declared in this scope
   85 |     int flags = fcntl(m_fd_stderr, F_GETFL);
      |                 ^~~~~
ceph/src/log/Log.cc:90:19: error: 'O_NONBLOCK' was not declared in this scope
   90 |     if (!(flags & O_NONBLOCK)) {
      |                   ^~~~~~~~~~
ceph/src/log/Log.cc:92:34: error: 'F_SETFL' was not declared in this scope
   92 |       flags = fcntl(m_fd_stderr, F_SETFL, flags);

We're going to skip this since we don't actually need to use
non-blocking IO with stderr on Windows.

Fixes: 2551130bcc12c55ddaa879b4f5b77c81890b51b2
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
src/log/Log.cc