]> Sergey Matveev's repositories - nnn.git/commitdiff
Wrap FILE_MIME_OPTS use in check (#622)
authorSijmen J. Mulder <ik@sjmulder.nl>
Mon, 1 Jun 2020 01:17:03 +0000 (03:17 +0200)
committerGitHub <noreply@github.com>
Mon, 1 Jun 2020 01:17:03 +0000 (06:47 +0530)
We leave it undefined on Solaris/Illumos because no such options exist,
so only use it if we have it.

src/nnn.c

index af3f4fe08ba377ec855048d8b43608174d0f490a..493a9204c7bf40938d90942dd9223122209f4549 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3698,9 +3698,11 @@ static bool show_stats(const char *fpath, const struct stat *sb)
                        }
                        fprintf(fp, " %s\n  ", begin);
 
+#ifdef FILE_MIME_OPTS
                        /* Show the file mime type */
                        get_output(g_buf, CMD_LEN_MAX, "file", FILE_MIME_OPTS, fpath, FALSE);
                        fprintf(fp, "%s", g_buf);
+#endif
                }
        }