This partially reverts commit a7577667d6.
The musl C library does not use an internal cdefs.h header. As a result,
the definitions in sys/cdefs.h have no effect. This breads the build as
follows:
In file included from adjfreq_linux.c:23:0:
../src/ntpd.h:448:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
__dead void fatal(const char *, ...)
^~~~
../src/ntpd.h:450:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
__dead void fatalx(const char *, ...)
^~~~
Refer the related musl FAQ about cdefs.h:
http://wiki.musl-libc.org/wiki/FAQ#Q:_I.27m_trying_to_compile_something_against_musl_and_I_get_error_messages_about_sys.2Fcdefs.h
Keep the compiler attribute definition.
Remove also from noinst_HEADERS.
There are crypto hash function symbol overlaps between libmd and libcrypto on
FreeBSD, which causes hashing of the certificates store to fail as a
side-effect when using TLS constraints. Since all we really need is MD5, just
use the embedded OpenBSD versions instead.
I could not find a lot of precedence for this, because most time
daemons do not actually look at the value of olddelta. Account for
olddelta getting stuck at 1ms, and for a NULL value of delta being
treated as an error condition.
- add closefrom fallback for OS X / Linux systems, extracted from sudo,
but without the optimized versions, since they cannot work in a
chroot environment (and we're not performance critical here.)
- enable detecting libtls
- conditionally enable https constraint support
Well, support may be too concrete of a term. There is a lot that is
missing in OS X, and not everything can be implemented with portability
shims. The time APIs in OS X seem to have frozen with NeXTSTEP and never
advanced with POSIX.