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>
main
Emmanuel Vadot 2020-01-21 17:58:28 +01:00 committed by Emmanuel Vadot
parent 41f3a7b3e5
commit 13c9de39a6
1 changed files with 2 additions and 0 deletions

View File

@ -4140,6 +4140,8 @@ drm_public char *drmGetDeviceNameFromFd2(int fd)
free(value); free(value);
return strdup(path); return strdup(path);
#elif __FreeBSD__
return drmGetDeviceNameFromFd(fd);
#else #else
struct stat sbuf; struct stat sbuf;
char node[PATH_MAX + 1]; char node[PATH_MAX + 1];