:: [DNG] [SOLVED] Error building vdev …
Página Inicial
Delete this message
Reply to this message
Autor: aitor_czr
Data:  
Para: dng
Assunto: [DNG] [SOLVED] Error building vdev in devuan beowulf
Hi all,

Maybe due to changes in glibc, the original sources of vdev don't build
successfully in devuan beowulf, getting errors like this one:


stat_path.c: In function ‘main’:
stat_path.c:1429:68: warning: implicit declaration of function ‘major’
[-Wimplicit-function-declaration]
       rc = vdev_sysfs_get_syspath_from_device( "/sys", sb.st_mode,
major( sb.st_rdev ), minor( sb.st_rdev ), &dev, &dev_len );
^~~~~
stat_path.c:1429:89: warning: implicit declaration of function ‘minor’;
did you mean ‘mknod’? [-Wimplicit-function-declaration]
       rc = vdev_sysfs_get_syspath_from_device( "/sys", sb.st_mode,
major( sb.st_rdev ), minor( sb.st_rdev ), &dev, &dev_len );


and also undefined references to makedev related with the `mayor(x)` and
`minor(x)` macros. What i've been able to find is that

these macros are translated by the preprocesor to `gnu_dev_major(x)` and
`gnu_dev_minor(x)`, respectively.

The first error appeared in "vdevd/helpers/LINUX/" and I added the
<sys/sysmacros.h> header to it, but the macros were required

by more and more .c files, including "vdevd/vdev.c" and
"vdevd/os/common.c".

So, finally decided to add the header:

#include <sys/sysmacros.h>

to "libvdev/util.h" and now vdev builds successfully.

Cheers,

Aitor.