jcnelson / vdev

A device-file manager for *nix
GNU General Public License v3.0
101 stars 13 forks source link

Compiling util-linux-ng from archlinux #57

Closed suedi closed 9 years ago

suedi commented 9 years ago

Get this message

In file included from misc-utils/lsblk.c:58:0:
./include/strutils.h:109:27: error: conflicting types for 'startswith'
 static inline const char *startswith(const char *s, const char *prefix)
                           ^
In file included from /usr/include/libudev.h:34:0,
                 from misc-utils/lsblk.c:47:
/usr/include/util.h:186:21: note: previous definition of 'startswith' was here
 static inline char *startswith(const char *s, const char *prefix) {

where util.h is libudev-compat/util.h

I commented out in /usr/include/util.h during compilation?? It worked but is that realy a good solution?

How to solve double declaration?

jcnelson commented 9 years ago

Hi @suedi,

Thank you for bringing this to my attention. Libudev-compat's libudev.h was including util.h from the libudev-compat/ directory, but it should not have been (since it can lead to double declarations if there is another util.h in gcc's include search path). This was removed in b4ecb3ecfbae51b911fe448d9d93f177805f00f5.

suedi commented 9 years ago

Did not recompile but occular inspection proves it OK

closing...