Skip to content

godefs breaks on struct rtentry #1162

@alberts

Description

@alberts
What steps will reproduce the problem?

godefs -gsyscall -f-m64 rtentry.c

#include <net/route.h>
typedef struct rtentry $Rtentry;

What is the expected output?

Fields should have unique names. Some pad fields have the same name.

What do you see instead?

type Rtentry struct {
        Pad1 uint64;
        Dst [16]byte /* sockaddr */;
        Gateway [16]byte /* sockaddr */;
        Genmask [16]byte /* sockaddr */;
        Flags uint16;
        Pad2 int16;
        Pad0 [4]byte;
        Pad3 uint64;
        Tos uint8;
        Class uint8;
        Pad4 [3]int16;
        Metric int16;
        Pad1 [6]byte;
        Dev *int8;
        Mtu uint64;
        Window uint64;
        Irtt uint16;
        Pad2 [6]byte;
}

Which revision are you using?  (hg identify)

cc2fee944133+ tip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions