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/compress_hints.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/compress_hints.h')
-rw-r--r-- | include/erofs/compress_hints.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/erofs/compress_hints.h b/include/erofs/compress_hints.h index a5772c7..43f80e1 100644 --- a/include/erofs/compress_hints.h +++ b/include/erofs/compress_hints.h @@ -6,6 +6,11 @@ #ifndef __EROFS_COMPRESS_HINTS_H #define __EROFS_COMPRESS_HINTS_H +#ifdef __cplusplus +extern "C" +{ +#endif + #include "erofs/internal.h" #include <sys/types.h> #include <regex.h> @@ -20,4 +25,9 @@ struct erofs_compress_hints { bool z_erofs_apply_compress_hints(struct erofs_inode *inode); void erofs_cleanup_compress_hints(void); int erofs_load_compress_hints(void); + +#ifdef __cplusplus +} +#endif + #endif |