[PATCH] node_device: Enclose Linux specific code in ifdef __linux__

Kristina Hanicova khanicov at redhat.com
Tue Jul 11 16:07:12 UTC 2023


On Tue, Jul 11, 2023 at 4:39 PM Michal Privoznik <mprivozn at redhat.com>
wrote:

> Our CI started to enable udev backend on FreeBSD. And while there
> is udev on FreeBSD some parts of our code are highly Linux
> specific, e.g. translating SCSI device type to string (from an
> integer obtained from the sysfs). Obviously, this doesn't work
> anywhere else. This is the reason why we need to include
> scsi/scsi.h header file (which actually comes from the Linux
> kernel source tree but for some reason glibc started to
> distribute it, followed by musl).
>
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/node_device/node_device_udev.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>

Reviewed-by: Kristina Hanicova <khanicov at redhat.com>
Kristina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230711/02fe2722/attachment.htm>


More information about the libvir-list mailing list