Solaris 10 compatability, try two
[exim.git] / src / OS / os.c-SunOS5
CommitLineData
dfe7d917
JH
1/*************************************************
2* Exim - an Internet mail transport agent *
3*************************************************/
4
5/* Copyright (c) University of Cambridge 2016 */
d8710e24 6/* Copyright (c) Jeremy Harris 2018 */
dfe7d917
JH
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
43ff44e9 12#if defined(MISSING_UNSETENV_3) && !defined(COMPILE_UTILITY)
dfe7d917
JH
13# include "setenv.c"
14#endif
15
d8710e24
JH
16/* This is missing in Solaris 10, present in Solaris 11.
17A feature-test would be good. */
18
19char *
0311ab05 20strndup(const char * s, unsigned long n)
d8710e24
JH
21{
22char * dest;
23if (!(dest = malloc(n))) return NULL;
24return strncpy(dest, s, n);
25}
26
dfe7d917 27/* End of os.c-SunOS5 */