mirror of
https://github.com/schoebel/mars
synced 2025-01-13 10:24:49 +00:00
infra: compatibility to new filldir_t
This commit is contained in:
parent
07887e1f74
commit
7d4dce3e27
@ -56,6 +56,8 @@
|
|||||||
*/
|
*/
|
||||||
#if !defined(__WAIT_ATOMIC_T_KEY_INITIALIZER) || defined(RHEL_RELEASE)
|
#if !defined(__WAIT_ATOMIC_T_KEY_INITIALIZER) || defined(RHEL_RELEASE)
|
||||||
#define HAS_VFS_READDIR
|
#define HAS_VFS_READDIR
|
||||||
|
#elif !defined(f_dentry)
|
||||||
|
#define __HAS_NEW_FILLDIR_T
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// end_remove_this
|
// end_remove_this
|
||||||
@ -711,16 +713,21 @@ struct mars_dir_context {
|
|||||||
#endif
|
#endif
|
||||||
// end_remove_this
|
// end_remove_this
|
||||||
|
|
||||||
|
#ifdef __HAS_NEW_FILLDIR_T
|
||||||
|
int mars_filler(struct dir_context *__buf, const char *name, int namlen, loff_t offset,
|
||||||
|
u64 ino, unsigned int d_type)
|
||||||
|
#else
|
||||||
static
|
static
|
||||||
int mars_filler(void *__buf, const char *name, int namlen, loff_t offset,
|
int mars_filler(void *__buf, const char *name, int namlen, loff_t offset,
|
||||||
u64 ino, unsigned int d_type)
|
u64 ino, unsigned int d_type)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// remove_this
|
// remove_this
|
||||||
#ifdef HAS_VFS_READDIR
|
#ifdef HAS_VFS_READDIR
|
||||||
struct mars_cookie *cookie = __buf;
|
struct mars_cookie *cookie = __buf;
|
||||||
#else
|
#else
|
||||||
// end_remove_this
|
// end_remove_this
|
||||||
struct mars_dir_context *buf = __buf;
|
struct mars_dir_context *buf = (void *)__buf;
|
||||||
struct mars_cookie *cookie = buf->cookie;
|
struct mars_cookie *cookie = buf->cookie;
|
||||||
// remove_this
|
// remove_this
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user