Don't declare fifofile if !FIFO

This commit is contained in:
Jacob 2023-08-09 20:37:39 +02:00
parent 3be3e38be6
commit 6dad73b9a4
2 changed files with 4 additions and 0 deletions

View file

@ -684,9 +684,11 @@ void conf_init(void) {
bindsfile = strdup(dest); bindsfile = strdup(dest);
} }
#if FIFO
if (config_setting_lookup_string(conf, "fifofile", &dest)) { if (config_setting_lookup_string(conf, "fifofile", &dest)) {
fifofile = strdup(dest); fifofile = strdup(dest);
} }
#endif
if (config_setting_lookup_string(conf, "screenshotfile", &dest) && strcmp(dest, "NULL")) { if (config_setting_lookup_string(conf, "screenshotfile", &dest) && strcmp(dest, "NULL")) {
screenshotfile = strdup(dest); screenshotfile = strdup(dest);

View file

@ -61,7 +61,9 @@ static int maxcache = 512; /* Max image size to cache */
static char *cachedir = "default"; /* Cache directory. Default means spmenu will determine automatically */ static char *cachedir = "default"; /* Cache directory. Default means spmenu will determine automatically */
/* FIFO options */ /* FIFO options */
#if FIFO
static char *fifofile = "/tmp/spmenu.fifo"; /* spmenu FIFO path */ static char *fifofile = "/tmp/spmenu.fifo"; /* spmenu FIFO path */
#endif
/* Screenshot options */ /* Screenshot options */
static char *screenshotfile = NULL; /* Screenshot file path. If set to NULL, the default path will be used. */ static char *screenshotfile = NULL; /* Screenshot file path. If set to NULL, the default path will be used. */