All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@buildroot.org
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH 1/1] package/tinyalsa: fix musl build
Date: Thu, 13 Jan 2022 19:09:40 +0100	[thread overview]
Message-ID: <20220113180940.232530-1-fontaine.fabrice@gmail.com> (raw)

Fix the following build failure on musl raised since bump to version
2.0.0 in commit 3b9c8f8cb53e449e39899a40712703c272c5eeff:

In file included from ../src/pcm_hw.c:42:
/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
  444 |  struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */
      |                  ^~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/a75e23dc585bd071f4d65face5489ed6ac22edbe

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0001-include-time.h-before-asound.h.patch | 76 +++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 package/tinyalsa/0001-include-time.h-before-asound.h.patch

diff --git a/package/tinyalsa/0001-include-time.h-before-asound.h.patch b/package/tinyalsa/0001-include-time.h-before-asound.h.patch
new file mode 100644
index 0000000000..c91213e2eb
--- /dev/null
+++ b/package/tinyalsa/0001-include-time.h-before-asound.h.patch
@@ -0,0 +1,76 @@
+From d91e947bda590765e1c791f40e8ffb4135ab1cd3 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 11 Jan 2022 00:01:49 +0100
+Subject: [PATCH] include time.h before asound.h
+
+Include time.h before asound.h to avoid the following build failure on
+musl that was already fixed a long time with
+https://github.com/tinyalsa/tinyalsa/commit/c8333f8c7a4e4b9549abeef7530b2cd20a18e537
+but reappeared on version 2.0.0:
+
+In file included from ../src/pcm_hw.c:42:
+/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
+  444 |  struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */
+      |                  ^~~~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/a75e23dc585bd071f4d65face5489ed6ac22edbe
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Retrieved from:
+https://github.com/tinyalsa/tinyalsa/commit/c127110249967e0722d80bb41e33713accdcff8f]
+---
+ src/mixer.c      | 1 +
+ src/mixer_hw.c   | 1 +
+ src/pcm_hw.c     | 1 +
+ src/pcm_plugin.c | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/src/mixer.c b/src/mixer.c
+index afbc015..029fc84 100644
+--- a/src/mixer.c
++++ b/src/mixer.c
+@@ -55,6 +55,7 @@
+ #define __user
+ #endif
+ 
++#include <time.h>
+ #include <sound/asound.h>
+ 
+ #include <tinyalsa/mixer.h>
+diff --git a/src/mixer_hw.c b/src/mixer_hw.c
+index da5a390..50e9d07 100644
+--- a/src/mixer_hw.c
++++ b/src/mixer_hw.c
+@@ -42,6 +42,7 @@
+ #include <sys/ioctl.h>
+ 
+ #include <linux/ioctl.h>
++#include <time.h>
+ #include <sound/asound.h>
+ 
+ #include "mixer_io.h"
+diff --git a/src/pcm_hw.c b/src/pcm_hw.c
+index 5eb53be..2383ae0 100644
+--- a/src/pcm_hw.c
++++ b/src/pcm_hw.c
+@@ -41,6 +41,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+ #include <linux/ioctl.h>
++#include <time.h>
+ #include <sound/asound.h>
+ #include <tinyalsa/asoundlib.h>
+ 
+diff --git a/src/pcm_plugin.c b/src/pcm_plugin.c
+index 47bf4a5..b6b69aa 100644
+--- a/src/pcm_plugin.c
++++ b/src/pcm_plugin.c
+@@ -40,6 +40,7 @@
+ 
+ #include <sys/ioctl.h>
+ #include <linux/ioctl.h>
++#include <time.h>
+ #include <sound/asound.h>
+ #include <tinyalsa/asoundlib.h>
+ #include <tinyalsa/plugin.h>
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-01-13 18:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 18:09 Fabrice Fontaine [this message]
2022-01-13 19:37 ` [Buildroot] [PATCH 1/1] package/tinyalsa: fix musl build Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220113180940.232530-1-fontaine.fabrice@gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.