0001-include-time.h-before-asound.h.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. From d91e947bda590765e1c791f40e8ffb4135ab1cd3 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Tue, 11 Jan 2022 00:01:49 +0100
  4. Subject: [PATCH] include time.h before asound.h
  5. Include time.h before asound.h to avoid the following build failure on
  6. musl that was already fixed a long time with
  7. https://github.com/tinyalsa/tinyalsa/commit/c8333f8c7a4e4b9549abeef7530b2cd20a18e537
  8. but reappeared on version 2.0.0:
  9. In file included from ../src/pcm_hw.c:42:
  10. /home/peko/autobuild/instance-1/output-1/host/i586-buildroot-linux-musl/sysroot/usr/include/sound/asound.h:444:18: error: field 'trigger_tstamp' has incomplete type
  11. 444 | struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */
  12. | ^~~~~~~~~~~~~~
  13. Fixes:
  14. - http://autobuild.buildroot.org/results/a75e23dc585bd071f4d65face5489ed6ac22edbe
  15. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  16. [Retrieved from:
  17. https://github.com/tinyalsa/tinyalsa/commit/c127110249967e0722d80bb41e33713accdcff8f]
  18. ---
  19. src/mixer.c | 1 +
  20. src/mixer_hw.c | 1 +
  21. src/pcm_hw.c | 1 +
  22. src/pcm_plugin.c | 1 +
  23. 4 files changed, 4 insertions(+)
  24. diff --git a/src/mixer.c b/src/mixer.c
  25. index afbc015..029fc84 100644
  26. --- a/src/mixer.c
  27. +++ b/src/mixer.c
  28. @@ -55,6 +55,7 @@
  29. #define __user
  30. #endif
  31. +#include <time.h>
  32. #include <sound/asound.h>
  33. #include <tinyalsa/mixer.h>
  34. diff --git a/src/mixer_hw.c b/src/mixer_hw.c
  35. index da5a390..50e9d07 100644
  36. --- a/src/mixer_hw.c
  37. +++ b/src/mixer_hw.c
  38. @@ -42,6 +42,7 @@
  39. #include <sys/ioctl.h>
  40. #include <linux/ioctl.h>
  41. +#include <time.h>
  42. #include <sound/asound.h>
  43. #include "mixer_io.h"
  44. diff --git a/src/pcm_hw.c b/src/pcm_hw.c
  45. index 5eb53be..2383ae0 100644
  46. --- a/src/pcm_hw.c
  47. +++ b/src/pcm_hw.c
  48. @@ -41,6 +41,7 @@
  49. #include <sys/ioctl.h>
  50. #include <sys/mman.h>
  51. #include <linux/ioctl.h>
  52. +#include <time.h>
  53. #include <sound/asound.h>
  54. #include <tinyalsa/asoundlib.h>
  55. diff --git a/src/pcm_plugin.c b/src/pcm_plugin.c
  56. index 47bf4a5..b6b69aa 100644
  57. --- a/src/pcm_plugin.c
  58. +++ b/src/pcm_plugin.c
  59. @@ -40,6 +40,7 @@
  60. #include <sys/ioctl.h>
  61. #include <linux/ioctl.h>
  62. +#include <time.h>
  63. #include <sound/asound.h>
  64. #include <tinyalsa/asoundlib.h>
  65. #include <tinyalsa/plugin.h>