Solaris 10 compatability, try two
[exim.git] / src / OS / os.c-SunOS5
... / ...
CommitLineData
1/*************************************************
2* Exim - an Internet mail transport agent *
3*************************************************/
4
5/* Copyright (c) University of Cambridge 2016 */
6/* Copyright (c) Jeremy Harris 2018 */
7/* See the file NOTICE for conditions of use and distribution. */
8
9/* Solaris-specific code. This is concatenated onto the generic
10src/os.c file. */
11
12#if defined(MISSING_UNSETENV_3) && !defined(COMPILE_UTILITY)
13# include "setenv.c"
14#endif
15
16/* This is missing in Solaris 10, present in Solaris 11.
17A feature-test would be good. */
18
19char *
20strndup(const char * s, unsigned long n)
21{
22char * dest;
23if (!(dest = malloc(n))) return NULL;
24return strncpy(dest, s, n);
25}
26
27/* End of os.c-SunOS5 */