Jason Thorpe <thor...@me.com> wrote: >> On Jul 18, 2023, at 2:57 PM, Mouse <mo...@rodents-montreal.org> wrote: >> >>>> What does Mesa use kcmp(2) for? >>> Working out whether two device handles are to the same DRM device. >> >>>> Is there another way to accomplish what Mesa is trying to use it for? >>> I don't know of one. >> >> Is fstat() plus checking st_rdev (and possibly other fields) >> insufficient? > > That *might* work in this particular case, but it would not work for > e.g. a cloning device where you get additional descriptors via dup() or > whatever.
Using fstat(2) does seem to work well enough for MesaLib, Xorg starts up now for me.