Commit | Line | Data |
---|---|---|
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 | |
10 | src/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. |
17 | A feature-test would be good. */ | |
18 | ||
19 | char * | |
0311ab05 | 20 | strndup(const char * s, unsigned long n) |
d8710e24 JH |
21 | { |
22 | char * dest; | |
23 | if (!(dest = malloc(n))) return NULL; | |
24 | return strncpy(dest, s, n); | |
25 | } | |
26 | ||
dfe7d917 | 27 | /* End of os.c-SunOS5 */ |