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.

68 lines
2.2 KiB

  1. From 256394399f57ba6e3057ee2c981127a14e4623f8 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
  3. Date: Tue, 22 Jan 2019 09:07:56 +0100
  4. Subject: [PATCH] Use uint64_t instead of u_int64_t
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. `uintN_t` is standard C99 type available in `<stdint.h>`, whereas `u_intN_t`
  9. is defined `<sys/types.h>`
  10. As upmpdcli already uses the `uintN_t` type, replace the few existing
  11. `u_intN_t` types, as it breaks build with the musl C library, which is
  12. very strict, because of the missing `<sys/types.h>`:
  13. ```
  14. src/mediaserver/cdplugins/netfetch.h:71:5: error: ‘u_int64_t’ does not name a type
  15. u_int64_t datacount() {
  16. ```
  17. ---
  18. src/mediaserver/cdplugins/netfetch.h | 12 ++++++------
  19. 1 file changed, 6 insertions(+), 6 deletions(-)
  20. diff --git a/src/mediaserver/cdplugins/netfetch.h b/src/mediaserver/cdplugins/netfetch.h
  21. index d7e9df4..d105e53 100644
  22. --- a/src/mediaserver/cdplugins/netfetch.h
  23. +++ b/src/mediaserver/cdplugins/netfetch.h
  24. @@ -68,7 +68,7 @@ public:
  25. /// Reset after transfer done, for retrying for exemple.
  26. virtual bool reset() = 0;
  27. - u_int64_t datacount() {
  28. + uint64_t datacount() {
  29. return fetch_data_count;
  30. }
  31. @@ -84,11 +84,11 @@ public:
  32. buf1cb = f;
  33. }
  34. // Called when the network transfer is done
  35. - void setEOFetchCB(std::function<void(bool ok, u_int64_t count)> f) {
  36. + void setEOFetchCB(std::function<void(bool ok, uint64_t count)> f) {
  37. eofcb = f;
  38. }
  39. // Called every time we get new data from the remote
  40. - void setFetchBytesCB(std::function<void(u_int64_t count)> f) {
  41. + void setFetchBytesCB(std::function<void(uint64_t count)> f) {
  42. fbcb = f;
  43. }
  44. @@ -98,11 +98,11 @@ protected:
  45. std::string _url;
  46. uint64_t startoffset;
  47. int timeoutsecs{0};
  48. - u_int64_t fetch_data_count{0};
  49. + uint64_t fetch_data_count{0};
  50. BufXChange<ABuffer*> *outqueue{nullptr};
  51. std::function<bool(std::string&, void *, int)> buf1cb;
  52. - std::function<void(u_int64_t)> fbcb;
  53. - std::function<void(bool, u_int64_t)> eofcb;
  54. + std::function<void(uint64_t)> fbcb;
  55. + std::function<void(bool, uint64_t)> eofcb;
  56. };
  57. #endif /* _MEDIAFETCH_H_INCLUDED_ */
  58. --
  59. 2.11.0