]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librados/asio: use boost::system::generic_category on Windows 48127/head
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 17 Feb 2023 10:55:07 +0000 (10:55 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Mon, 20 Feb 2023 12:59:30 +0000 (12:59 +0000)
commitc93daea80a18e87a2267c350dca81b8ed8c99687
treed32d7d82fa46d7734214a8dc8e139d03af4a4348
parent0824384ea986c8fa5c8c79f9db90cc92fb5e750c
librados/asio: use boost::system::generic_category on Windows

librados uses "errno.h" error codes. On Windows,
boost::system::system_category refers to errors from winerror.h.

That being considered, we'll add a platform check and use
boost::system::generic_category on Windows. This ensures that
error code comparisons work as expected.

This issue was brought up by the following test assertion failure:

  ft2.4: ceph_test_rados_api_asio.AsioRados.AsyncWriteCallbacktesttools.
    testresult.real._StringException: details: {{{
  /ceph/src/test/librados/asio.cc:148
  Expected equality of these values:
    boost::system::errc::read_only_file_system
      Which is: 30
    ec
      Which is: system:30
  }}}

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
src/librados/librados_asio.h