OSDN Git Service

misc: fix build on absence of magic.h
authorArtemiy Volkov <artemiyv@acm.org>
Sat, 4 Oct 2014 17:22:52 +0000 (13:22 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 4 Oct 2014 17:22:52 +0000 (13:22 -0400)
If magic.h is not present, there will be unresolved references to the magic_t
type in plausible.c. Fix that by moving the protecting #ifdef directive.

Signed-off-by: Artemiy Volkov <artemiyv@acm.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/plausible.c

index aea4fce..00bc6e2 100644 (file)
 #include "nls-enable.h"
 #include "blkid/blkid.h"
 
+#ifdef HAVE_MAGIC_H
 static magic_t (*dl_magic_open)(int);
 static const char *(*dl_magic_file)(magic_t, const char *);
 static int (*dl_magic_load)(magic_t, const char *);
 static void (*dl_magic_close)(magic_t);
 
-#ifdef HAVE_MAGIC_H
 #ifdef HAVE_DLOPEN
 #include <dlfcn.h>