From c8f3816f826b305a7d1ec669c0ee9fdbbd945775 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 14 Jun 2018 20:31:05 -0700 Subject: htpdate: Add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix build with musl Signed-off-by: Khem Raj Cc: Andreas Müller Acked-by: Andreas Müller --- ...ironment-variables-assignments-to-be-weak.patch | 31 +++++++++++++++++ .../0001-Replace-ntp_adjtime-with-adjtimex.patch | 40 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch create mode 100644 meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch (limited to 'meta-networking/recipes-support/htpdate/htpdate') diff --git a/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch b/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch new file mode 100644 index 0000000000..0ee44c1621 --- /dev/null +++ b/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch @@ -0,0 +1,31 @@ +From 04603f52d793f964653e6a985944400fe4fa87ee Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 13 Jun 2018 17:50:20 -0700 +Subject: [PATCH] Make environment variables assignments to be weak + +So that OE can override them for cross builds + +Signed-off-by: Khem Raj +--- + Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 1c80c09..884126c 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,11 +2,11 @@ prefix = $(DESTDIR)/usr + bindir = ${prefix}/bin + mandir = ${prefix}/share/man + +-CC = gcc ++CC ?= gcc + CFLAGS += -Wall -std=c99 -pedantic -O2 + +-INSTALL = /usr/bin/install -c +-STRIP = /usr/bin/strip -s ++INSTALL ?= /usr/bin/install -c ++STRIP ?= /usr/bin/strip -s + + all: htpdate + diff --git a/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch b/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch new file mode 100644 index 0000000000..cca8c6c364 --- /dev/null +++ b/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch @@ -0,0 +1,40 @@ +From 75646a2d2df14fdbc4a01e222a779afac94861d1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 14 Jun 2018 20:11:08 -0700 +Subject: [PATCH] Replace ntp_adjtime with adjtimex. + +ntp_adjtime in glibc is an alias to adjtimex and +musl does not provide ntp_adjtime at all + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + htpdate.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/htpdate.c b/htpdate.c +index 4171efe..ff0bf8d 100644 +--- a/htpdate.c ++++ b/htpdate.c +@@ -391,7 +391,7 @@ static int htpdate_adjtimex( double drift ) { + + /* Read current kernel frequency */ + tmx.modes = 0; +- ntp_adjtime(&tmx); ++ adjtimex(&tmx); + + /* Calculate new frequency */ + freq = (long)(65536e6 * drift); +@@ -406,7 +406,7 @@ static int htpdate_adjtimex( double drift ) { + + /* Become root */ + swuid(0); +- return( ntp_adjtime(&tmx) ); ++ return( adjtimex(&tmx) ); + + } + +-- +2.17.1 + -- cgit 1.2.3-korg