]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
include: move ALLPERMS definition to compat.h 50988/head
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Thu, 30 Mar 2023 12:14:10 +0000 (12:14 +0000)
committerXiubo Li <xiubli@redhat.com>
Tue, 11 Apr 2023 02:49:25 +0000 (10:49 +0800)
commit9e7da89571871bdbd51d8b381c859ecb5ba752be
tree1cc1f3979adcba737e7fa2825f7b297835c7327e
parentcb2848bb9be74a87ed365064dbf6dca997f0ea6b
include: move ALLPERMS definition to compat.h

The Windows CI job started to fail as some libcephfs tests that use
ALLPERMS have been moved [1] to a separate file which doesn't have
the ALLPERMS definition.

  /ceph/src/test/libcephfs/suidsgid.cc:240:36: error: ‘ALLPERMS’ was
  not declared in this scope
  240 |   ASSERT_EQ(stx.stx_mode & (mode_t)ALLPERMS, before_mode);

We'll move this definition to compat.h so that we won't have to
redefine it in each file that uses it.

Note that we're moving the Windows "fs_compat.h" include up,
ensuring that the constants used by ALLPERMS are defined.

[1] https://github.com/ceph/ceph/commit/254eeb2730881ee48b4743e1422749d5b643f52a

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit a2966c08171e006acfd9c32b00a1294f428c7e62)
Conflicts:
 - src/test/libcephfs/test.cc: with 'using namespace std'.
src/include/compat.h
src/test/libcephfs/test.cc
src/test/libcephfs/vxattr.cc