0013-FTPParse.cpp-use-std-string.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. From 5fa10ff6b1b60abee172296d9c1dec8dfc10615c Mon Sep 17 00:00:00 2001
  2. From: Stefan Saraev <stefan@saraev.ca>
  3. Date: Sun, 7 May 2017 17:30:47 +0300
  4. Subject: [PATCH] FTPParse.cpp: use std::string
  5. Fixes build with newer gcc versions.
  6. Taken from [1]
  7. Upstream-Status: Backport [2]
  8. [1] https://git.busybox.net/buildroot/plain/package/kodi/0003-FTPParse.cpp-use-std-string.patch?id=e2f03a6bde19766a1ac047c5ccfb049b5c4f61ca
  9. [2] https://github.com/xbmc/xbmc/commit/5fa10ff6b1b60abee172296d9c1dec8dfc10615c
  10. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  11. ---
  12. xbmc/filesystem/FTPParse.cpp | 44 ++++++++++++++++++++++----------------------
  13. 1 file changed, 22 insertions(+), 22 deletions(-)
  14. diff --git a/xbmc/filesystem/FTPParse.cpp b/xbmc/filesystem/FTPParse.cpp
  15. index cfcc7c64ed..b0f676ae1a 100644
  16. --- a/xbmc/filesystem/FTPParse.cpp
  17. +++ b/xbmc/filesystem/FTPParse.cpp
  18. @@ -34,7 +34,7 @@ CFTPParse::CFTPParse()
  19. m_time = 0;
  20. }
  21. -string CFTPParse::getName()
  22. +std::string CFTPParse::getName()
  23. {
  24. return m_name;
  25. }
  26. @@ -59,16 +59,16 @@ time_t CFTPParse::getTime()
  27. return m_time;
  28. }
  29. -void CFTPParse::setTime(string str)
  30. +void CFTPParse::setTime(std::string str)
  31. {
  32. /* Variables used to capture patterns via the regexes */
  33. - string month;
  34. - string day;
  35. - string year;
  36. - string hour;
  37. - string minute;
  38. - string second;
  39. - string am_or_pm;
  40. + std::string month;
  41. + std::string day;
  42. + std::string year;
  43. + std::string hour;
  44. + std::string minute;
  45. + std::string second;
  46. + std::string am_or_pm;
  47. /* time struct used to set the time_t variable */
  48. struct tm time_struct = {};
  49. @@ -338,21 +338,21 @@ int CFTPParse::getDayOfWeek(int month, int date, int year)
  50. return day_of_week;
  51. }
  52. -int CFTPParse::FTPParse(string str)
  53. +int CFTPParse::FTPParse(std::string str)
  54. {
  55. /* Various variable to capture patterns via the regexes */
  56. - string permissions;
  57. - string link_count;
  58. - string owner;
  59. - string group;
  60. - string size;
  61. - string date;
  62. - string name;
  63. - string type;
  64. - string stuff;
  65. - string facts;
  66. - string version;
  67. - string file_id;
  68. + std::string permissions;
  69. + std::string link_count;
  70. + std::string owner;
  71. + std::string group;
  72. + std::string size;
  73. + std::string date;
  74. + std::string name;
  75. + std::string type;
  76. + std::string stuff;
  77. + std::string facts;
  78. + std::string version;
  79. + std::string file_id;
  80. /* Regex for standard Unix listing formats */
  81. pcrecpp::RE unix_re("^([-bcdlps])" // type
  82. --
  83. 2.11.0