aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-02 13:26:13 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-02 13:26:13 +0000
commit41356c04c3dcedb29de159a48393523fa07bd5d1 (patch)
tree685d78af9fde0609e782ac41af87a4faf67ed146
parent5875bc4cb9a96cc81aa7e62448db5cd8be7d6489 (diff)
downloadgnunet-41356c04c3dcedb29de159a48393523fa07bd5d1.tar.gz
gnunet-41356c04c3dcedb29de159a48393523fa07bd5d1.zip
-fix ftbfs if extractor.h present but libextractor.so missing
-rw-r--r--src/fs/fs_getopt.c4
-rw-r--r--src/fs/gnunet-search.c12
-rw-r--r--src/fs/test_fs_directory.c2
3 files changed, 11 insertions, 7 deletions
diff --git a/src/fs/fs_getopt.c b/src/fs/fs_getopt.c
index 46a35e16a..8657c62de 100644
--- a/src/fs/fs_getopt.c
+++ b/src/fs/fs_getopt.c
@@ -127,7 +127,7 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
127 const char *value) 127 const char *value)
128{ 128{
129 struct GNUNET_CONTAINER_MetaData **mm = scls; 129 struct GNUNET_CONTAINER_MetaData **mm = scls;
130#if HAVE_EXTRACTOR_H 130#if HAVE_EXTRACTOR_H && HAVE_LIBEXTRACTOR
131 enum EXTRACTOR_MetaType type; 131 enum EXTRACTOR_MetaType type;
132 const char *typename; 132 const char *typename;
133 const char *typename_i18n; 133 const char *typename_i18n;
@@ -147,7 +147,7 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
147 */ 147 */
148 /*tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value), locale_charset ());*/ 148 /*tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value), locale_charset ());*/
149 tmp = GNUNET_strdup (value); 149 tmp = GNUNET_strdup (value);
150#if HAVE_EXTRACTOR_H 150#if HAVE_EXTRACTOR_H && HAVE_LIBEXTRACTOR
151 type = EXTRACTOR_metatype_get_max (); 151 type = EXTRACTOR_metatype_get_max ();
152 while (type > 0) 152 while (type > 0)
153 { 153 {
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c
index 0ddcd892e..dfe6d0e75 100644
--- a/src/fs/gnunet-search.c
+++ b/src/fs/gnunet-search.c
@@ -72,13 +72,17 @@ static struct GNUNET_SCHEDULER_Task *tt;
72 * @param data_mime_type mime-type of data (not of the original file); 72 * @param data_mime_type mime-type of data (not of the original file);
73 * can be NULL (if mime-type is not known) 73 * can be NULL (if mime-type is not known)
74 * @param data actual meta-data found 74 * @param data actual meta-data found
75 * @param data_size number of bytes in data 75 * @param data_size number of bytes in @a data
76 * @return 0 to continue extracting, 1 to abort 76 * @return 0 to continue extracting, 1 to abort
77 */ 77 */
78static int 78static int
79item_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, 79item_printer (void *cls,
80 enum EXTRACTOR_MetaFormat format, const char *data_mime_type, 80 const char *plugin_name,
81 const char *data, size_t data_size) 81 enum EXTRACTOR_MetaType type,
82 enum EXTRACTOR_MetaFormat format,
83 const char *data_mime_type,
84 const char *data,
85 size_t data_size)
82{ 86{
83 if ((format != EXTRACTOR_METAFORMAT_UTF8) && 87 if ((format != EXTRACTOR_METAFORMAT_UTF8) &&
84 (format != EXTRACTOR_METAFORMAT_C_STRING)) 88 (format != EXTRACTOR_METAFORMAT_C_STRING))
diff --git a/src/fs/test_fs_directory.c b/src/fs/test_fs_directory.c
index 74ce07381..edffdc7fa 100644
--- a/src/fs/test_fs_directory.c
+++ b/src/fs/test_fs_directory.c
@@ -99,7 +99,7 @@ testDirectory (unsigned int i)
99 { 99 {
100 GNUNET_snprintf (txt, sizeof (txt), "%u -- %u\n", p, q); 100 GNUNET_snprintf (txt, sizeof (txt), "%u -- %u\n", p, q);
101 GNUNET_CONTAINER_meta_data_insert (mds[p], "<test>", 101 GNUNET_CONTAINER_meta_data_insert (mds[p], "<test>",
102#if HAVE_EXTRACTOR_H 102#if HAVE_EXTRACTOR_H && HAVE_LIBEXTRACTOR
103 q % EXTRACTOR_metatype_get_max (), 103 q % EXTRACTOR_metatype_get_max (),
104#else 104#else
105 q % 128, 105 q % 128,