summaryrefslogtreecommitdiff
path: root/xf86drm.c
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.Org>2020-01-21 17:58:28 +0100
committerEmmanuel Vadot <manu@FreeBSD.org>2020-04-21 19:26:54 +0200
commit13c9de39a671e0f0dd586f3e4520408b4008e094 (patch)
treed586ad36c3f9d862b6937badbd369cbfb8ea76d3 /xf86drm.c
parent41f3a7b3e5048af002d7ec137be735770cb71d88 (diff)
downloadlibdrm-13c9de39a671e0f0dd586f3e4520408b4008e094.tar.gz
libdrm-13c9de39a671e0f0dd586f3e4520408b4008e094.tar.bz2
libdrm-13c9de39a671e0f0dd586f3e4520408b4008e094.zip
libdrm: drmGetDeviceNameFromFd2: Add FreeBSD variant
The FreeBSD variant of drmGetDeviceNameFromFd can already handle the different node type so just call it. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'xf86drm.c')
-rw-r--r--xf86drm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xf86drm.c b/xf86drm.c
index d873ebb1..ec1cf3f2 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -4140,6 +4140,8 @@ drm_public char *drmGetDeviceNameFromFd2(int fd)
free(value);
return strdup(path);
+#elif __FreeBSD__
+ return drmGetDeviceNameFromFd(fd);
#else
struct stat sbuf;
char node[PATH_MAX + 1];