summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/strndup.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2018-03-30 18:23:07 +1100
committerDarren Tucker <dtucker@dtucker.net>2018-03-30 18:23:07 +1100
commit2c71ca1dd1efe458cb7dee3f8a1a566f913182c2 (patch)
tree4906d911bcd351c9113675939ab9bd89b30753ae /openbsd-compat/strndup.c
parent6b5a17bc14e896e3904dc58d889b58934cfacd24 (diff)
Disable native strndup and strnlen on AIX.
On at least some revisions of AIX, strndup returns unterminated strings under some conditions, apparently because strnlen returns incorrect values in those cases. Disable both on AIX and use the replacements from openbsd-compat. Fixes problem with ECDSA keys there, ok djm.
Diffstat (limited to 'openbsd-compat/strndup.c')
-rw-r--r--openbsd-compat/strndup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/strndup.c b/openbsd-compat/strndup.c
index 0fcb96f6..ebb4eccf 100644
--- a/openbsd-compat/strndup.c
+++ b/openbsd-compat/strndup.c
@@ -17,7 +17,7 @@
*/
#include "config.h"
-#ifndef HAVE_STRNDUP
+#if !defined(HAVE_STRNDUP) || defined(BROKEN_STRNDUP)
#include <sys/types.h>
#include <stddef.h>