kumquat-buildroot/package/vlc/0008-fix-fallback-code-and-add-required-realtime-library-.patch
Thomas Petazzoni 0fb1b80532 vlc: switch to proper Git formatted patches
VLC uses Git as its version control system, so it makes sense to use
Git formatted patches.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-05-01 22:33:59 +02:00

41 lines
1.2 KiB
Diff

From b5d4edd81bcb685cbea61b01d54afa1fe200b7d2 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Fri, 26 Aug 2016 15:11:25 +0200
Subject: [PATCH] fix fallback code and add required realtime library to link
command
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
configure.ac | 1 +
src/posix/thread.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 15cb4edcfd..16e44a8c61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,7 @@ case "${host_os}" in
;;
linux*)
SYS=linux
+ AC_CHECK_LIB([rt], [posix_spawnp], [VLC_ADD_LIBS([libvlccore],[-lrt])], [], [])
;;
bsdi*)
SYS=bsdi
diff --git a/src/posix/thread.c b/src/posix/thread.c
index 07fa71eb3e..8b8595fcb8 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -85,7 +85,7 @@ static clockid_t vlc_clock_id;
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.14.3