Move the definition of SYS_INPUT_DIR to where it is used, instead of at
the top of the file, to make it easier to find.
Undefine it at the end of usage to avoid accidental uses.
Signed-off-by: Niclas Zeising <zeising@daemonic.se>
#include "libevdev-uinput-int.h"
#include "libevdev-util.h"
-#define SYS_INPUT_DIR "/sys/devices/virtual/input/"
-
#ifndef UINPUT_IOCTL_BASE
#define UINPUT_IOCTL_BASE 'U'
#endif
static int
fetch_syspath_and_devnode(struct libevdev_uinput *uinput_dev)
{
+#define SYS_INPUT_DIR "/sys/devices/virtual/input/"
struct dirent **namelist;
int ndev, i;
int rc;
free(namelist);
return uinput_dev->devnode ? 0 : -1;
+#undef SYS_INPUT_DIR
}
static int