diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-01-24 19:29:42 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-01-24 19:29:42 +0300 |
commit | d444a5d7405016a5094e26050cfb453bcd6f882a (patch) | |
tree | 64e64cdc97dc128b5cf4a7aebeec32ef5bf47e63 /evdev.c | |
parent | b45726451da90bba61d75f817982d2abdfbb0542 (diff) | |
download | applause2-d444a5d7405016a5094e26050cfb453bcd6f882a.tar.gz |
evdev: access struct dirent via helper function applause_dirent_name() instead directly from Lua
* the structure is highly platform-dependant and might even differ between 32-bit and 64-bit systems
* in particular this fixes EvdevStream on FreeBSD
Diffstat (limited to 'evdev.c')
-rw-r--r-- | evdev.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -6,6 +6,7 @@ #include <unistd.h> #include <string.h> #include <fcntl.h> +#include <dirent.h> #include <sys/ioctl.h> #include <sys/types.h> @@ -25,6 +26,12 @@ struct applause_evdev { pthread_t thread; }; +const char * +applause_dirent_name(const struct dirent *entry) +{ + return entry->d_name; +} + char * applause_evdev_getname(const char *node) { |