package/x11r7/xdriver_xf86-video-siliconmotion: bump version to 1.7.9
[buildroot-gz.git] / package / autofs / 0002-autofs-build-check-for-clock_gettime-in-librt.patch
blobade6d1cdb32bd527a836591c78d3ef45ea57783d
1 From a38ab6c0f2790e047fc64867865eb2a073135618 Mon Sep 17 00:00:00 2001
2 From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3 Date: Sun, 19 Jun 2016 00:17:41 -0300
4 Subject: [PATCH] autofs: build: check for clock_gettime in librt
6 Glibc versions older than 2.17 define clock_gettime() in librt, so add a
7 check for this.
9 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
10 ---
11 Patch status: sent to autofs@ mailing list
13 Makefile.conf.in | 3 +++
14 Makefile.rules | 2 ++
15 configure.in | 4 ++++
16 3 files changed, 9 insertions(+)
18 diff --git a/Makefile.conf.in b/Makefile.conf.in
19 index cb53e66..2bc3202 100644
20 --- a/Makefile.conf.in
21 +++ b/Makefile.conf.in
22 @@ -11,6 +11,9 @@
23 DAEMON_CFLAGS = @DAEMON_CFLAGS@
24 DAEMON_LDFLAGS = @DAEMON_LDFLAGS@
26 +# Glibc < 2.17 requires librt for clock_gettime()
27 +LIBCLOCK_GETTIME = @LIBCLOCK_GETTIME@
29 # Special parameters for glibc (libc 6)
30 LIBNSL = @LIBNSL@
31 LIBRESOLV = @LIBRESOLV@
32 diff --git a/Makefile.rules b/Makefile.rules
33 index 6fa3e02..7d1af2e 100644
34 --- a/Makefile.rules
35 +++ b/Makefile.rules
36 @@ -56,6 +56,8 @@ endif
38 LIBS += $(LIBNSL)
40 +LIBS += $(LIBCLOCK_GETTIME)
42 # Standard rules
44 .SUFFIXES: .c .o .s .so
45 diff --git a/configure.in b/configure.in
46 index 25d7c4e..a4318e8 100644
47 --- a/configure.in
48 +++ b/configure.in
49 @@ -177,6 +177,10 @@ if test "$ac_cv_search_versionsort" = "no"; then
50 [Define if your C library does not provide versionsort])
53 +# glibc < 2.17 needs librt for clock_gettime()
54 +AC_CHECK_LIB(rt, clock_gettime, LIBCLOCK_GETTIME="-lrt")
55 +AC_SUBST(LIBCLOCK_GETTIME)
58 # glibc/libc 6 new libraries
60 --
61 2.7.3