Skribent: aitor_czr Dato: Til: dng Emne: Re: [DNG] [SOLVED] Error building vdev in devuan beowulf
Hi again,
On 15/2/19 6:47, aitor_czr wrote: >
> 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.
> Sorry for the typing and size changes throughout some of my emails, it
happens to me using thunderbird. I'll switch to clawsmail :)