0005-media-rename-local-function-conflicting-with-pause-2.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 124dee151746b4a8a2e8a7194af78f2c82f75d79 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
  3. Date: Wed, 3 Mar 2021 08:57:36 +0100
  4. Subject: [PATCH] media: rename local function conflicting with pause(2)
  5. profiles/audio/media.c:1284:13: error: conflicting types for 'pause'; have '_Bool(void *)'
  6. 1284 | static bool pause(void *user_data)
  7. | ^~~~~
  8. In file included from /usr/include/bits/sigstksz.h:24,
  9. from /usr/include/signal.h:315,
  10. from /usr/include/glib-2.0/glib/gbacktrace.h:36,
  11. from /usr/include/glib-2.0/glib.h:34,
  12. from profiles/audio/media.c:21:
  13. /usr/include/unistd.h:478:12: note: previous declaration of 'pause' with type 'int(void)'
  14. 478 | extern int pause (void);
  15. | ^~~~~
  16. ---
  17. profiles/audio/media.c | 4 ++--
  18. 1 file changed, 2 insertions(+), 2 deletions(-)
  19. diff --git a/profiles/audio/media.c b/profiles/audio/media.c
  20. index c84bbe22dc..3d8c4b69c3 100644
  21. --- a/profiles/audio/media.c
  22. +++ b/profiles/audio/media.c
  23. @@ -1281,7 +1281,7 @@ static bool stop(void *user_data)
  24. return media_player_send(mp, "Stop");
  25. }
  26. -static bool pause(void *user_data)
  27. +static bool pause_play(void *user_data)
  28. {
  29. struct media_player *mp = user_data;
  30. @@ -1331,7 +1331,7 @@ static struct avrcp_player_cb player_cb = {
  31. .set_volume = set_volume,
  32. .play = play,
  33. .stop = stop,
  34. - .pause = pause,
  35. + .pause = pause_play,
  36. .next = next,
  37. .previous = previous,
  38. };