musl: update to the latest git version, fixes TLS issues
[openwrt.git] / toolchain / musl / patches / 901-crypt_size_hack.patch
1 --- a/src/crypt/crypt_r.c
2 +++ b/src/crypt/crypt_r.c
3 @@ -19,12 +19,6 @@ char *__crypt_r(const char *key, const c
4         if (salt[0] == '$' && salt[1] && salt[2]) {
5                 if (salt[1] == '1' && salt[2] == '$')
6                         return __crypt_md5(key, salt, output);
7 -               if (salt[1] == '2' && salt[3] == '$')
8 -                       return __crypt_blowfish(key, salt, output);
9 -               if (salt[1] == '5' && salt[2] == '$')
10 -                       return __crypt_sha256(key, salt, output);
11 -               if (salt[1] == '6' && salt[2] == '$')
12 -                       return __crypt_sha512(key, salt, output);
13         }
14         return __crypt_des(key, salt, output);
15  }
16 --- a/src/crypt/crypt_sha512.c
17 +++ b/src/crypt/crypt_sha512.c
18 @@ -12,6 +12,7 @@
19  #include <stdio.h>
20  #include <string.h>
21  #include <stdint.h>
22 +#if 0
23  
24  /* public domain sha512 implementation based on fips180-3 */
25  /* >=2^64 bits messages are not supported (about 2000 peta bytes) */
26 @@ -369,3 +370,4 @@ char *__crypt_sha512(const char *key, co
27                 return "*";
28         return p;
29  }
30 +#endif
31 --- a/src/crypt/crypt_blowfish.c
32 +++ b/src/crypt/crypt_blowfish.c
33 @@ -50,6 +50,7 @@
34  #include <string.h>
35  #include <stdint.h>
36  
37 +#if 0
38  typedef uint32_t BF_word;
39  typedef int32_t BF_word_signed;
40  
41 @@ -796,3 +797,4 @@ char *__crypt_blowfish(const char *key,
42  
43         return "*";
44  }
45 +#endif
46 --- a/src/crypt/crypt_sha256.c
47 +++ b/src/crypt/crypt_sha256.c
48 @@ -13,6 +13,7 @@
49  #include <string.h>
50  #include <stdint.h>
51  
52 +#if 0
53  /* public domain sha256 implementation based on fips180-3 */
54  
55  struct sha256 {
56 @@ -320,3 +321,4 @@ char *__crypt_sha256(const char *key, co
57                 return "*";
58         return p;
59  }
60 +#endif