You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1007 B

  1. --- a/compat.h
  2. +++ b/compat.h
  3. @@ -230,7 +230,9 @@ int daemon(int, int);
  4. #ifndef HAVE_B64_NTOP
  5. /* b64_ntop.c */
  6. #undef b64_ntop /* for Cygwin */
  7. -int b64_ntop(const char *, size_t, char *, size_t);
  8. +int local_b64_ntop(const char *, size_t, char *, size_t);
  9. +#else
  10. +#define local_b64_ntop b64_ntop
  11. #endif
  12. #ifndef HAVE_FORKPTY
  13. --- a/tty.c
  14. +++ b/tty.c
  15. @@ -1070,7 +1070,7 @@ tty_cmd_setselection(struct tty *tty, co
  16. off = 4 * ((ctx->num + 2) / 3) + 1; /* storage for base64 */
  17. buf = xmalloc(off);
  18. - b64_ntop(ctx->ptr, ctx->num, buf, off);
  19. + local_b64_ntop(ctx->ptr, ctx->num, buf, off);
  20. tty_putcode_ptr2(tty, TTYC_MS, "", buf);
  21. free(buf);
  22. --- a/compat/b64_ntop.c
  23. +++ b/compat/b64_ntop.c
  24. @@ -122,7 +122,7 @@ static const char Pad64 = '=';
  25. */
  26. int
  27. -b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
  28. +local_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
  29. size_t datalength = 0;
  30. uint8_t input[3];
  31. uint8_t output[4];