001-musl.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --- a/bsdiff.c 2005-08-17 00:13:52.000000000 +0200
  2. +++ b/bsdiff.c 2016-02-21 01:39:31.157915765 +0100
  3. @@ -101,7 +101,7 @@
  4. if(start+len>kk) split(I,V,kk,start+len-kk,h);
  5. }
  6. -static void qsufsort(off_t *I,off_t *V,u_char *old,off_t oldsize)
  7. +static void qsufsort(off_t *I,off_t *V,unsigned char *old,off_t oldsize)
  8. {
  9. off_t buckets[256];
  10. off_t i,h,len;
  11. @@ -139,7 +139,7 @@
  12. for(i=0;i<oldsize+1;i++) I[V[i]]=i;
  13. }
  14. -static off_t matchlen(u_char *old,off_t oldsize,u_char *new,off_t newsize)
  15. +static off_t matchlen(unsigned char *old,off_t oldsize,unsigned char *new,off_t newsize)
  16. {
  17. off_t i;
  18. @@ -149,8 +149,8 @@
  19. return i;
  20. }
  21. -static off_t search(off_t *I,u_char *old,off_t oldsize,
  22. - u_char *new,off_t newsize,off_t st,off_t en,off_t *pos)
  23. +static off_t search(off_t *I,unsigned char *old,off_t oldsize,
  24. + unsigned char *new,off_t newsize,off_t st,off_t en,off_t *pos)
  25. {
  26. off_t x,y;
  27. @@ -175,7 +175,7 @@
  28. };
  29. }
  30. -static void offtout(off_t x,u_char *buf)
  31. +static void offtout(off_t x,unsigned char *buf)
  32. {
  33. off_t y;
  34. @@ -196,7 +196,7 @@
  35. int main(int argc,char *argv[])
  36. {
  37. int fd;
  38. - u_char *old,*new;
  39. + unsigned char *old,*new;
  40. off_t oldsize,newsize;
  41. off_t *I,*V;
  42. off_t scan,pos,len;
  43. @@ -206,9 +206,9 @@
  44. off_t overlap,Ss,lens;
  45. off_t i;
  46. off_t dblen,eblen;
  47. - u_char *db,*eb;
  48. - u_char buf[8];
  49. - u_char header[32];
  50. + unsigned char *db,*eb;
  51. + unsigned char buf[8];
  52. + unsigned char header[32];
  53. FILE * pf;
  54. BZFILE * pfbz2;
  55. int bz2err;
  56. --- a/bspatch.c 2005-08-17 00:14:00.000000000 +0200
  57. +++ b/bspatch.c 2016-02-21 01:39:29.753859970 +0100
  58. @@ -36,7 +36,7 @@
  59. #include <unistd.h>
  60. #include <fcntl.h>
  61. -static off_t offtin(u_char *buf)
  62. +static off_t offtin(unsigned char *buf)
  63. {
  64. off_t y;
  65. @@ -62,8 +62,8 @@
  66. int fd;
  67. ssize_t oldsize,newsize;
  68. ssize_t bzctrllen,bzdatalen;
  69. - u_char header[32],buf[8];
  70. - u_char *old, *new;
  71. + unsigned char header[32],buf[8];
  72. + unsigned char *old, *new;
  73. off_t oldpos,newpos;
  74. off_t ctrl[3];
  75. off_t lenread;