rpm-4.10.3.1.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. diff --git a/misc/fts.c b/misc/fts.c
  2. index 9fbefe3..27e9c42 100644
  3. --- a/misc/fts.c
  4. +++ b/misc/fts.c
  5. @@ -61,6 +61,12 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
  6. # define _STAT_VER 0
  7. # define __fxstat64(_stat_ver, _fd, _sbp) fstat64((_fd), (_sbp))
  8. #endif
  9. +#if defined(__CYGWIN__)
  10. +# define __errno_location() (&errno)
  11. +# define stat64 stat
  12. +# define _STAT_VER 0
  13. +# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
  14. +#endif
  15. #include "system.h"
  16. #include <stdlib.h>
  17. #include <string.h>
  18. diff --git a/misc/fts.h b/misc/fts.h
  19. index 47c650e..a1ed262 100644
  20. --- a/misc/fts.h
  21. +++ b/misc/fts.h
  22. @@ -53,6 +53,10 @@
  23. # define _LARGEFILE64_SOURCE
  24. #endif
  25. +#if defined(__CYGWIN__)
  26. +# define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
  27. +#endif
  28. +
  29. #if defined(sun)
  30. # define _D_EXACT_NAMLEN(d) ((d)->d_reclen)
  31. #endif
  32. diff --git a/rpmdb.c b/rpmdb.c
  33. index 7223fdf..53e95f5 100644
  34. --- a/rpmdb.c
  35. +++ b/rpmdb.c
  36. @@ -5,7 +5,7 @@
  37. #include "cliutils.h"
  38. #include "debug.h"
  39. -#if !defined(__GLIBC__) && !defined(__APPLE__)
  40. +#if !defined(__GLIBC__) && !defined(__APPLE__) && !defined(__CYGWIN__)
  41. char ** environ = NULL;
  42. #endif
  43. diff --git a/rpmkeys.c b/rpmkeys.c
  44. index fa4e4d8..42416d7 100644
  45. --- a/rpmkeys.c
  46. +++ b/rpmkeys.c
  47. @@ -5,7 +5,7 @@
  48. #include "cliutils.h"
  49. #include "debug.h"
  50. -#if !defined(__GLIBC__) && !defined(__APPLE__)
  51. +#if !defined(__GLIBC__) && !defined(__APPLE__) && !defined(__CYGWIN__)
  52. char ** environ = NULL;
  53. #endif
  54. diff --git a/rpmsign.c b/rpmsign.c
  55. index e29864e..868cd78 100644
  56. --- a/rpmsign.c
  57. +++ b/rpmsign.c
  58. @@ -8,7 +8,7 @@
  59. #include "cliutils.h"
  60. #include "debug.h"
  61. -#if !defined(__GLIBC__) && !defined(__APPLE__)
  62. +#if !defined(__GLIBC__) && !defined(__APPLE__) && !defined(__CYGWIN__)
  63. char ** environ = NULL;
  64. #endif
  65. diff --git a/sign/rpmgensig.c b/sign/rpmgensig.c
  66. index 7695ffa..13d7fd9 100644
  67. --- a/sign/rpmgensig.c
  68. +++ b/sign/rpmgensig.c
  69. @@ -22,7 +22,7 @@
  70. #include "debug.h"
  71. -#if !defined(__GLIBC__) && !defined(__APPLE__)
  72. +#if !defined(__GLIBC__) && !defined(__APPLE__) && !defined(__CYGWIN__)
  73. char ** environ = NULL;
  74. #endif
  75. diff --git a/system.h b/system.h
  76. index 0037244..5f69d75 100644
  77. --- a/system.h
  78. +++ b/system.h
  79. @@ -119,11 +119,13 @@ typedef char * security_context_t;
  80. #define setprogname(pn)
  81. #else
  82. #define __progname program_name
  83. +#if !defined(__CYGWIN__)
  84. #define setprogname(pn) \
  85. { if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \
  86. else __progname = pn; \
  87. }
  88. #endif
  89. +#endif
  90. extern const char *__progname;
  91. /* Take care of NLS matters. */