-fix ftbfs if extractor.h present but libextractor.so missing
authorChristian Grothoff <christian@grothoff.org>
Sat, 2 Jul 2016 13:26:13 +0000 (13:26 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 2 Jul 2016 13:26:13 +0000 (13:26 +0000)
src/fs/fs_getopt.c
src/fs/gnunet-search.c
src/fs/test_fs_directory.c

index 46a35e16a5d312e0c3f78d26faaed0f5cde21a99..8657c62dee1159c304911fc771db6a46d67f4b60 100644 (file)
@@ -127,7 +127,7 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
                                const char *value)
 {
   struct GNUNET_CONTAINER_MetaData **mm = scls;
-#if HAVE_EXTRACTOR_H
+#if HAVE_EXTRACTOR_H && HAVE_LIBEXTRACTOR
   enum EXTRACTOR_MetaType type;
   const char *typename;
   const char *typename_i18n;
@@ -147,7 +147,7 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
    */
   /*tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value), locale_charset ());*/
   tmp = GNUNET_strdup (value);
-#if HAVE_EXTRACTOR_H
+#if HAVE_EXTRACTOR_H && HAVE_LIBEXTRACTOR
   type = EXTRACTOR_metatype_get_max ();
   while (type > 0)
   {
index 0ddcd892ee76a15b2635bd86043280a1ac117e61..dfe6d0e75f4439c1452ce092b3c0e2eb75ff6e05 100644 (file)
@@ -72,13 +72,17 @@ static struct GNUNET_SCHEDULER_Task *tt;
  * @param data_mime_type mime-type of data (not of the original file);
  *        can be NULL (if mime-type is not known)
  * @param data actual meta-data found
- * @param data_size number of bytes in data
+ * @param data_size number of bytes in @a data
  * @return 0 to continue extracting, 1 to abort
  */
 static int
-item_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type,
-              enum EXTRACTOR_MetaFormat format, const char *data_mime_type,
-              const char *data, size_t data_size)
+item_printer (void *cls,
+              const char *plugin_name,
+              enum EXTRACTOR_MetaType type,
+              enum EXTRACTOR_MetaFormat format,
+              const char *data_mime_type,
+              const char *data,
+              size_t data_size)
 {
   if ((format != EXTRACTOR_METAFORMAT_UTF8) &&
       (format != EXTRACTOR_METAFORMAT_C_STRING))
index 74ce073819bb970d5a4f58edf467da248d80f91b..edffdc7fad6ceb1428b5f922f6a65dc7a1fd6c6e 100644 (file)
@@ -99,7 +99,7 @@ testDirectory (unsigned int i)
     {
       GNUNET_snprintf (txt, sizeof (txt), "%u -- %u\n", p, q);
       GNUNET_CONTAINER_meta_data_insert (mds[p], "<test>",
-#if HAVE_EXTRACTOR_H
+#if HAVE_EXTRACTOR_H && HAVE_LIBEXTRACTOR
                                          q % EXTRACTOR_metatype_get_max (),
 #else
                                          q % 128,