Pārlūkot izejas kodu

ntpd: fix fortify source compatibility

The ntpd package ships autoconf macros which attempt to test for the C99
compliance of `snprintf()` and `vsnprintf()`.

Those macros unconditionally consider the functions not compliant in a cross
compile setting and therfore break all subsequent configure tests because
the `snprintf` and `vsnprintf` symbols are shadowed with `#define` directives
redirecting them to their respectiv gnulib replacements.

The fortify source headers in turn will `#undef` those defines when wrapping
the associated functions and therfore cause all `conftest` programs to emit
a failure.

Pass the required magic autoconf cache variables via `CONFIGURE_VARS` to let
`./configure` assume C99 compliance of the affected functions, thus fixing
the build.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Jo-Philipp Wich 9 gadus atpakaļ
vecāks
revīzija
cbf11196b7
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4
    2
      net/ntpd/Makefile

+ 4
- 2
net/ntpd/Makefile Parādīt failu

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=ntp
11 11
 PKG_VERSION:=4.2.8p2
12
-PKG_RELEASE:=2
12
+PKG_RELEASE:=3
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
@@ -93,7 +93,9 @@ endef
93 93
 CONFIGURE_VARS += \
94 94
 	ac_cv_header_md5_h=no \
95 95
 	ac_cv_lib_rt_sched_setscheduler=no \
96
-	ac_cv_header_dns_sd_h=no
96
+	ac_cv_header_dns_sd_h=no \
97
+	hw_cv_func_snprintf_c99=yes \
98
+	hw_cv_func_vsnprintf_c99=yes \
97 99
 
98 100
 CONFIGURE_ARGS += \
99 101
 	--disable-all-clocks \