Brent Cook
19d2615f52
support SOCK_CLOEXEC on macOS
7 years ago
Brent Cook
2408cc16e7
compat updates, add recallocarray and freezero
7 years ago
Brent Cook
a7577667d6
use __dead macro from sys/cdefs.h
8 years ago
Brent Cook
6b66e4aa11
include FreeBSD compat for _NSIG - from naddy@
8 years ago
Paul B. Henson
2bb74c098b
Add sys/wait.h stub header with WAIT_ANY definition for systems (such as
Solaris and illumos based distributions) which don't have it.
9 years ago
Brent Cook
a18259d9b9
portability fixes
9 years ago
Brent Cook
7ec2068906
remove unnecessary header defines, condense md5
9 years ago
Brent Cook
15a611b230
pare back the unconditional MD5/SHA builtins patch
e0ed8ed664
went too far and broke the
backward compat headers for Linux systems.
9 years ago
kinichiro
9d7e230cc7
add stdio.h for definition of asprintf and vasprintf
10 years ago
kinichiro
ee0dfcfd61
add sys/mman.h for MAP_ANON and MAP_ANONYMOUS
10 years ago
Brent Cook
cc8e1790f3
define SHA2_SMALL to remove unneeded SHA hashes
This also removes the need for __weak_alias shims
9 years ago
Brent Cook
366b8de487
include a daemon prototype if needed
9 years ago
Brent Cook
f100b7bdd1
undef MODEMASK from Solaris 10
9 years ago
Brent Cook
8f13cf4a96
include the missing return type for _warn
9 years ago
Brent Cook
87be206389
ensure that sys/types.h includes endian definitions
9 years ago
Brent Cook
6759f143ed
add cdefs shim for defining __weak_alias on platforms without it
9 years ago
Paul B. Henson
1248e2b50a
Add ifaddrs.h stub header file for systems (such as Solaris 10) which
do not have it, and a getifaddrs substitute for Solaris 10.
9 years ago
Paul B. Henson
f427a68fd0
Add paths.h stub for systems (such as Solaris 10) without it.
9 years ago
Brent Cook
e0ed8ed664
do not link -lmd to get MD5* functions
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.
9 years ago
Brent Cook
3efb0d135f
remove unused stub functions, init code
9 years ago
Brent Cook
7933741802
work around quirky behavior of Solaris adjtime
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.
9 years ago
Brent Cook
128bd48fe2
include tls.h with the distribution package
9 years ago
Brent Cook
b493f59fb8
refresh for the latest ntpd upstream code
- 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
9 years ago
Brent Cook
8dafd6324d
Go back to original SA_LEN macro.
Due to some circular dependencies on Solaris, this needs to be defined
as a macro. We should just remove SA_LEN usage here next.
10 years ago
Brent Cook
f3d67df248
Improve err.h macros.
Handle 'NULL', emit the program name.
10 years ago
Brent Cook
cefe9907fd
correct arc4random/arc4random_uniform checks
reported by Loganaden Velvindron
10 years ago
Brent Cook
6f93baf369
fix setproctitle on OS X and Linux
Call the compat code and select the correct emulation mode.
Remove the string encoding support, since we have fixed inputs for the
title string.
10 years ago
Brent Cook
b759f56133
add fallback err.h and queue.h
10 years ago
Brent Cook
12bfe6dafa
move and improve SA_LEN emulation
If sa_family is not set, sa_len should be zero.
10 years ago
Brent Cook
46eb3fcad9
remove unneeded compat string functions
10 years ago
Brent Cook
8e4c175c42
update copyright block, patches
I removed all of the code in fake-sensors, I don't think Henning wants
all the credit for an empty file.
10 years ago
Brent Cook
17f348961a
be more direct about obtaining BSD integer types
10 years ago
Brent Cook
3f25522c31
include the BSD integer types
TODO: convert u_int_* types to uint_*
10 years ago
Brent Cook
4b191ba09c
remove duplicate md5 defs, check for Solaris -lmd5
10 years ago
Brent Cook
1970d59422
include time.h in the distribution
10 years ago
Brent Cook
9b4d748b44
initial OS X 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.
10 years ago
Brent Cook
4f2207cfa8
remove __weak_alias
10 years ago
Brent Cook
55a755daff
define __weak_alias
10 years ago
Brent Cook
1273571998
distribute hash compat headers
10 years ago
Brent Cook
0d56dc4684
use libc SHA512 implementation
Remove dependency on libcrypto, include hash headers in a nicer way.
10 years ago
Brent Cook
558f0dd84f
add missing compatibilty headers
10 years ago
Brent Cook
d5b81b8ed2
new OpenNTPD portable tree
First attempt at building a new OpenNTPD portable project, based on the
latest OpenBSD source.
10 years ago