diff options
Diffstat (limited to 'os_compat.h')
-rw-r--r-- | os_compat.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/os_compat.h b/os_compat.h index 4dbe9de3..93ea8b06 100644 --- a/os_compat.h +++ b/os_compat.h @@ -17,6 +17,8 @@ extern "C" { #ifndef HAVE_CLOCK_GETTIME +/* Simulate ANSI/POSIX clock_gettime() on platforms that don't have it */ + #include <time.h> #ifndef CLOCKID_T_DEFINED @@ -46,6 +48,17 @@ int clock_gettime(clockid_t, struct timespec *); #endif /* !HAVE_CLOCK_GETTIME */ +/* + * Wrapper or substitute for Linux/BSD daemon() + * + * There are some issues with this function even when it's present, so + * wrapping it confines the issues to a single place in os_compat.c. + */ + +int os_daemon(int nochdir, int noclose); + +/* Provide BSD strlcat()/strlcpy() on platforms that don't have it */ + #ifndef HAVE_STRLCAT #include <string.h> |