From c8285d9b313ea4ffa78262b5c278e1643befa298 Mon Sep 17 00:00:00 2001 From: Richard Nyberg Date: Mon, 12 Jan 2009 22:14:10 +0100 Subject: Don't use the bsd err and warn family of functions. Solaris doesn't have them. --- cli/btinfo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cli/btinfo.c') diff --git a/cli/btinfo.c b/cli/btinfo.c index 8c32475..dfcddcb 100644 --- a/cli/btinfo.c +++ b/cli/btinfo.c @@ -1,11 +1,11 @@ #include -#include #include #include #include #include #include +#include #include #include "metainfo.h" @@ -75,8 +75,11 @@ main(int argc, char **argv) while (argc > 0) { char *mi = NULL; - if ((mi = mi_load(*argv, NULL)) == NULL) - err(1, "mi_load: %s", *argv); + if ((mi = mi_load(*argv, NULL)) == NULL) { + fprintf(stderr, "failed to load torrent file '%s' (%s).\n", + *argv, strerror(errno)); + exit(1); + } print_metainfo(mi); free(mi); -- cgit 1.4.1