Skip to content

Commit

Permalink
test: Include compat.h to find uid_t/gid_t/gidlist when cross compiling
Browse files Browse the repository at this point in the history
This change is necessary to prevent the following type of messages
(and compile failures) when cross-compiling:

/src/include/cephfs/libcephfs.h:148:29: error: 'uid_t' was not declared in this scope; did you mean 'pid_t'?
  148 | UserPerm *ceph_userperm_new(uid_t uid, gid_t gid, int ngids, gid_t *gidlist);
      |                             ^~~~~
      |                             pid_t

/home/abuild/rpmbuild/BUILD/ceph-15.1.0-1521-gcdf35413a0/src/include/cephfs/libcephfs.h:148:40: error: 'gid_t' was not declared in this scope; did you mean 'pid_t'?
  148 | UserPerm *ceph_userperm_new(uid_t uid, gid_t gid, int ngids, gid_t *gidlist);
      |                                        ^~~~~
      |                                        pid_t

Signed-off-by: Mike Latimer <[email protected]>
  • Loading branch information
ml8mr authored and petrutlucian94 committed Dec 9, 2020
1 parent ae812dc commit 95ccc1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/test/libcephfs_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/

#include "gtest/gtest.h"
#include "include/compat.h"
#include "include/cephfs/libcephfs.h"

#include <sstream>
Expand Down

0 comments on commit 95ccc1c

Please sign in to comment.