configure | 8 ++++---- configure.in | 2 +- main.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 2db841c..9149572 100755 --- a/configure +++ b/configure @@ -3287,13 +3287,13 @@ fi -{ echo "$as_me:$LINENO: checking for SHA1 in -lssl" >&5 -echo $ECHO_N "checking for SHA1 in -lssl... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for SHA1 in -lcrypto" >&5 +echo $ECHO_N "checking for SHA1 in -lcrypto... $ECHO_C" >&6; } if test "${ac_cv_lib_ssl_SHA1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl $LIBS" +LIBS="-lcrypto $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3353,7 +3353,7 @@ if test $ac_cv_lib_ssl_SHA1 = yes; then #define HAVE_LIBSSL 1 _ACEOF - LIBS="-lssl $LIBS" + LIBS="-lcrypto $LIBS" else { { echo "$as_me:$LINENO: error: error, OpenSSL required" >&5 diff --git a/configure.in b/configure.in index 12951e7..8fc0dfb 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ AC_INIT(main.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(createtorrent,1.1.4) AC_PROG_CC -AC_CHECK_LIB([ssl],[SHA1],,[AC_MSG_ERROR([error, OpenSSL required])]) +AC_CHECK_LIB([crypto],[SHA1],,[AC_MSG_ERROR([error, OpenSSL required])]) AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADER([openssl/sha.h],,[AC_MSG_ERROR([Error, OpenSSL header file sha.h not found.])]) diff --git a/main.c b/main.c index c0a3e18..0ce70d1 100644 --- a/main.c +++ b/main.c @@ -120,13 +120,13 @@ int create_announce( const char* announce, const char* src, const char* output, FILE* f = fopen( output, "w" ); if( f ) { // Open main dictionary and write "announce" - fprintf( f, "d8:announce%d:%s:%s%s", + fprintf( f, "d8:announce%zi:%s:%s%s", strlen( announce ) + strlen( path ) + strlen( port ) + 1, announce, port, path ); // "comment" if( comment ) { - fprintf( f, "7:comment%d:%s", + fprintf( f, "7:comment%zi:%s", strlen( comment ), comment ); } @@ -178,7 +178,7 @@ void write_name( const char* name, FILE* f ) while( p != name && *( p - 1 ) != '/' ) --p; c = strdup( p ); c[ l - p + 1 ] = 0; - fprintf( f, "4:name%d:%s", l - p + 1, c ); + fprintf( f, "4:name%zi:%s", l - p + 1, c ); free( c ); } @@ -233,7 +233,7 @@ void format_path( char *in, char *out ) memcpy(out,"pathl",5); s = strtok(in, "/"); while (s) { - snprintf(t, sizeof(t), "%i:%s", strlen(s), s); + snprintf(t, sizeof(t), "%zi:%s", strlen(s), s); strcat(out, t); s = strtok(NULL, "/"); }