]> granicus.if.org Git - curl/commitdiff
metalink: fix build errors when disabled
authorDaniel Stenberg <daniel@haxx.se>
Sat, 26 May 2012 21:20:23 +0000 (23:20 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 26 May 2012 21:20:23 +0000 (23:20 +0200)
src/tool_metalink.c
src/tool_metalink.h

index 6e18b4247f2f4f8df816d3957e91c8c7a55a8204..58aae831d556b0a816c4d93bb7a196c1f2ebcf73 100644 (file)
@@ -31,6 +31,8 @@
 #  include <fcntl.h>
 #endif
 
+#ifdef HAVE_LIBMETALINK
+
 #include <metalink/metalink_parser.h>
 
 #include "rawstr.h"
@@ -618,3 +620,5 @@ void clean_metalink(struct Configurable *config)
   }
   config->metalinkfile_last = 0;
 }
+
+#endif /* HAVE_LIBMETALINK */
index e3c66fc23c37d213ea107db064dc70a02a730cd6..25feddcad253c5e6c6425b97937ebc02ae3e0838 100644 (file)
@@ -52,9 +52,14 @@ typedef struct metalinkfile {
 /*
  * Counts the resource in the metalinkfile.
  */
+#ifdef HAVE_LIBMETALINK
 int count_next_metalink_resource(metalinkfile *mlfile);
-
 void clean_metalink(struct Configurable *config);
+#else
+#define count_next_metalink_resource(x) 0
+#define clean_metalink(x)
+#endif
+
 
 int parse_metalink(struct Configurable *config, const char *infile);