- Fixed a whole bunch of dependencies on defines between files, examples and tests
diff --git a/programs/hash/md5sum.c b/programs/hash/md5sum.c
index 2d72d99..fb7283c 100644
--- a/programs/hash/md5sum.c
+++ b/programs/hash/md5sum.c
@@ -30,8 +30,17 @@
#include <string.h>
#include <stdio.h>
+#include "polarssl/config.h"
+
#include "polarssl/md5.h"
+#if !defined(POLARSSL_MD5_C) || !defined(POLARSSL_FS_IO)
+int main( void )
+{
+ printf("POLARSSL_MD5_C and/or POLARSSL_FS_IO not defined.\n");
+ return( 0 );
+}
+#else
static int md5_wrapper( char *filename, unsigned char *sum )
{
int ret = md5_file( filename, sum );
@@ -159,3 +168,4 @@
return( ret );
}
+#endif /* POLARSSL_MD5_C && POLARSSL_FS_IO */