diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-12-01 21:53:15 +0800 |
---|---|---|
committer | Gao Xiang <xiang@kernel.org> | 2021-12-02 09:46:13 +0800 |
commit | 519dbd2368240c4c6d159459ab5614e1d9540c3c (patch) | |
tree | 45b5804f92d5ce225347db5435f8690ccbf01924 /include/erofs/config.h | |
parent | c816397a43b050fff84337b4484e67f72cb5501a (diff) | |
download | erofs-utils-519dbd2368240c4c6d159459ab5614e1d9540c3c.tar.gz |
erofs-utils: make liberofs more C++ friendly
1. Add extern "C" wrappers to headers, so that they can be included
from C++
2. Add const keywords to certain pointer type params
Link: https://lore.kernel.org/r/20211201135315.3732-1-xiang@kernel.org
Signed-off-by: Kelvin Zhang <zhangkelvin@google.com>
Signed-off-by: Gao Xiang <xiang@kernel.org>
Diffstat (limited to 'include/erofs/config.h')
-rw-r--r-- | include/erofs/config.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/include/erofs/config.h b/include/erofs/config.h index 2040dc6..cb064b6 100644 --- a/include/erofs/config.h +++ b/include/erofs/config.h @@ -7,20 +7,14 @@ #ifndef __EROFS_CONFIG_H #define __EROFS_CONFIG_H +#ifdef __cplusplus +extern "C" +{ +#endif + #include "defs.h" #include "err.h" -#ifdef HAVE_LIBSELINUX -#include <selinux/selinux.h> -#include <selinux/label.h> -#endif - -#ifdef WITH_ANDROID -#include <selinux/android.h> -#include <private/android_filesystem_config.h> -#include <private/canned_fs_config.h> -#include <private/fs_config.h> -#endif enum { FORCE_INODE_COMPACT = 1, @@ -96,4 +90,8 @@ static inline int erofs_selabel_open(const char *file_contexts) } #endif +#ifdef __cplusplus +} +#endif + #endif |