Skip to content

key_t in tests/hashtable_test.c may conflict with sys/types.h  #134

@wRAR

Description

@wRAR

On kFreeBSD tests/hashtable_test.c fails to compile:

/«PKGBUILDDIR»/tests/hashtable_test.c:30:13: error: conflicting types for 'key_t'
 typedef int key_t;
             ^~~~~
In file included from /usr/include/stdlib.h:275:0,
                 from /«PKGBUILDDIR»/src/hashtable.h:24,
                 from /«PKGBUILDDIR»/tests/hashtable_test.c:27:
/usr/include/x86_64-kfreebsd-gnu/sys/types.h:122:17: note: previous declaration of 'key_t' was here
 typedef __key_t key_t;
                 ^~~~~

It may be a coincidence that the conflict doesn't happen on Linux as <sys/types.h> there may define this type too.

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