Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wRAR opened this issue Nov 12, 2017 · 2 comments
Closed

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

wRAR opened this issue Nov 12, 2017 · 2 comments

Comments

@wRAR
Copy link
Contributor

wRAR commented Nov 12, 2017

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.

@dbaarda
Copy link
Member

dbaarda commented Nov 15, 2017

Ugh, I'm sorry about that. There doesn't seem to be that typedef on linux.

That is just the unittest example and could use any name. I'll try to fix it as part of a big name audit.

@wRAR
Copy link
Contributor Author

wRAR commented Nov 18, 2017

There doesn't seem to be that typedef on linux.

Either the file doesn't get included or the conditions are false. There is that typedef in <sys/types.h> on my Linux.

@dbaarda dbaarda closed this as completed in 9db8b90 Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants