Skip to content

Build error #2

@Aniark

Description

@Aniark

On Debian 11, kernel version 5.10.92

  CC [M]  /root/pk3c/proc_version.o
/root/pk3c/proc_version.c: In function ‘ver_create’:
/root/pk3c/proc_version.c:45:54: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   45 |         ver_file = proc_create(PROCFS_NAME, 0, NULL, &ver_fops);
      |                                                      ^~~~~~~~~
      |                                                      |
      |                                                      const struct file_operations *
In file included from /root/pk3c/proc_version.c:9:
/usr/src/linux-headers-5.10.0-19-common/include/linux/proc_fs.h:109:122: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
  109 |  *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
      |                                                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions