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
parent
41f3a7b3e5
commit
13c9de39a6
|
@ -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];
|
||||||
|
|
Loading…
Reference in New Issue