I've suggested this to Karol previously as a possible path to fixing libdrm_nouveau.
Just import the whole library from libdrm and stop linking against the libdrm one.
Only the top two commits here matter, mostly importing it to see if it builds in CI.
TODO
-
Fix debug handling