in xf86drm.c, we include <sys/sysmacros.h> to get the system definition of makedev. this turns out to be a bad move. with some glibc versions, makedev() is a macro, and with some it's an inline function. since gcc's inline keyword is merely a suggestion, occasionally we get the awkward situation where the call to makedev() is emitted as a function call into glibc, which the elfloader is apparently unable to handle correctly. in the future the dlloader should handle this correctly. in the meantime, the attached patch should fix it. one potential issue is that the full definition of gnu_dev_makedev is more elaborate than our replacement; i doubt it ever matters though.
Created attachment 564 [details] [review] always use our definition of makedev()
This patch doesn't seem like an entirely good idea. It leads to redefinition of makedev (not a huge problem, but enough to trigger a compiler warning) I kept the original patch for this ultra-minimal just to show what the bug was and offer a workaround for those affected. Better options for a real fix: - #undef makedev - don't include <sys/sysmacros.h> - call the macro something else and use it by its new name (to not conflict) - don't use a macro at all (just merge the logic into the program) One of the last two is probably best.
right you are. not including sysmacros.h does the right thing. committed (to both Xorg and drm), thanks.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.