qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATC 7/9] Skipping drm build, unsupported


From: Gerd Hoffmann
Subject: Re: [PATC 7/9] Skipping drm build, unsupported
Date: Tue, 30 Jun 2020 18:53:56 +0200

> > > > -util-obj-$(CONFIG_POSIX) += drm.o
> > > > +util-obj-$(CONFIG_LINUX) += drm.o
> >
> > Can't see anything linux-specific there.  Also note that FreeBSD (and
> > possibly other *BSDs too) have drm support.  So CONFIG_POSIX looks
> > correct to me.
> 
> This change was my suggestion; I assumed that "open /dev/dri/whatever"
> was Linux-specific. The specific thing that doesn't work on
> Haiku, or on Solaris for that matter, is that the code uses
> DT_CHR, which isn't in POSIX but is a Linux-and-BSDism.

Ah, that is the problem.  Yes, DT_CHR is an non-posix optimization which
allows to get the file type directly, without another round-trip to the
kernel.  If that isn't available you can stat() the file and check
((st_mode & S_IFMT) == S_IFCHR) instead.

take care,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]