[patch] fix prototype for __md5_crypt()
Bernhard Fischer
rep.nop at aon.at
Thu Jul 6 11:36:13 UTC 2006
Hi,
r14464 broke building in IMA-mode since it introduced a conflict in the
prototype for libcrypt's __md5_crypt() which got changed to have
unsigned args.
The attached patch makes both decls consistent and adds the appropriate
cast to the dispatcher of the md5 routine in crypt().
Ok?
-------------- next part --------------
Index: uClibc/libcrypt/crypt.c
===================================================================
--- uClibc/libcrypt/crypt.c (revision 15618)
+++ uClibc/libcrypt/crypt.c (working copy)
@@ -13,7 +13,7 @@
#include <crypt.h>
#include <unistd.h>
-extern char * __md5_crypt( const char *pw, const char *salt) attribute_hidden;
+extern char * __md5_crypt( const unsigned char *pw, const unsigned char *salt) attribute_hidden;
extern char * __des_crypt( const char *pw, const char *salt) attribute_hidden;
char * crypt(const char *key, const char *salt)
@@ -21,7 +21,7 @@ char * crypt(const char *key, const char
/* First, check if we are supposed to be using the MD5 replacement
* instead of DES... */
if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$')
- return __md5_crypt(key, salt);
+ return __md5_crypt((unsigned char*)key, (unsigned char*)salt);
else
return __des_crypt(key, salt);
}
More information about the uClibc
mailing list