Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] vlc: fix compile error with uClibc-ng Linuxthreads
Date: Thu, 25 Aug 2016 21:08:32 +0200	[thread overview]
Message-ID: <20160825190832.GA4674@waldemar-brodkorb.de> (raw)

The fallback code path didn't work correctly, so fix it.

Fixes:
  http://autobuild.buildroot.net/results/3122287ddea1e316a64ccf0d0dc9415bfefebb49/

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
---
v1 -> v2:
 - rework autobuild failure, there is fallback code for non-NPTL,
   so fix it up. Suggested by Thomas Petazzoni 
---
 package/vlc/0008-fix-fallback-time.patch | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 package/vlc/0008-fix-fallback-time.patch

diff --git a/package/vlc/0008-fix-fallback-time.patch b/package/vlc/0008-fix-fallback-time.patch
new file mode 100644
index 0000000..9692001
--- /dev/null
+++ b/package/vlc/0008-fix-fallback-time.patch
@@ -0,0 +1,27 @@
+fix fallback code and add missing libraries to link command
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur vlc-2.2.4.orig/configure.ac vlc-2.2.4/configure.ac
+--- vlc-2.2.4.orig/configure.ac	2016-05-31 18:11:07.000000000 +0200
++++ vlc-2.2.4/configure.ac	2016-08-24 21:15:50.555256426 +0200
+@@ -121,6 +121,7 @@
+     ;;
+   linux*)
+     SYS=linux
++    AC_CHECK_LIB([rt], [posix_spawnp], [VLC_ADD_LIBS([libvlccore],[-lpthread -lrt])], [], [-lpthread])
+     ;;
+   bsdi*)
+     SYS=bsdi
+diff -Nur vlc-2.2.4.orig/src/posix/thread.c vlc-2.2.4/src/posix/thread.c
+--- vlc-2.2.4.orig/src/posix/thread.c	2015-02-02 20:42:32.000000000 +0100
++++ vlc-2.2.4/src/posix/thread.c	2016-08-24 19:46:02.717783031 +0200
+@@ -85,7 +85,7 @@
+ 
+ static void vlc_clock_setup_once (void)
+ {
+-# if (_POSIX_MONOTONIC_CLOCK == 0)
++# if (_POSIX_MONOTONIC_CLOCK == 0) && (_POSIX_CLOCK_SELECTION > 0)
+     long val = sysconf (_SC_MONOTONIC_CLOCK);
+     assert (val != 0);
+     vlc_clock_id = (val < 0) ? CLOCK_REALTIME : CLOCK_MONOTONIC;
-- 
2.1.4

             reply	other threads:[~2016-08-25 19:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 19:08 Waldemar Brodkorb [this message]
2016-08-26  9:15 ` [Buildroot] [PATCH v2] vlc: fix compile error with uClibc-ng Linuxthreads 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=20160825190832.GA4674@waldemar-brodkorb.de \
    --to=wbx@openadk.org \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox