aboutsummaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/minidlna/minidlna/0001-configure-Check-for-clock_gettime-seprately-from-__N.patch
blob: dd29797a66731f4ff488e4aa9e41965d57731ac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 93e7e25a10c890b8c8cd06cbfd78175c30999d31 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 9 Mar 2020 09:44:33 -0700
Subject: [PATCH] configure: Check for clock_gettime seprately from
 __NR_clock_gettime

This helps prioritize using clock_gettime API from libc over syscall
since direct use of __NR_clock_gettime is not time64-safe

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index 3d218ea..aa7dd1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,6 +127,10 @@ case $host in
 esac
 
 AC_CHECK_HEADERS(syscall.h sys/syscall.h mach/mach_time.h)
+
+AC_MSG_CHECKING([for clock_gettime])
+AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [use clock_gettime])],)
+
 AC_MSG_CHECKING([for __NR_clock_gettime syscall])
 AC_COMPILE_IFELSE(
     [AC_LANG_PROGRAM(