c2rust icon indicating copy to clipboard operation
c2rust copied to clipboard

Conflict module name with `--reorganize-definitions`

Open kvinwang opened this issue 5 years ago • 0 comments

I am trying to transpile a kernel module with --reorganize-definitions.

got some errors:

6183  | pub mod linux_netlink_h {
      | ----------------------- previous definition of the module `linux_netlink_h` here
...
16880 | pub mod linux_netlink_h {
      | ^^^^^^^^^^^^^^^^^^^^^^^ `linux_netlink_h` redefined here
      |
      = note: `linux_netlink_h` must be defined only once in the type namespace of this module

generated code at 6183:

#[c2rust::header_src =
  "/usr/src/kernels/3.10.0-327.el7.x86_64/include/uapi/linux/netlink.h:4"]
pub mod linux_netlink_h {
    /* Nothing.     */
    /* Error        */

and at 16880:

#[c2rust::header_src =
  "/usr/src/kernels/3.10.0-327.el7.x86_64/include/linux/netlink.h:4"]
pub mod linux_netlink_h {
    /* Packet data is mmaped */

c2rust version: 067ae31ad9932ba89a8466cc604ecae4f3a0c422

kvinwang avatar Feb 18 '20 12:02 kvinwang