summaryrefslogtreecommitdiff
path: root/common/compat.h
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2018-07-13 17:39:35 +0200
committerDaiki Ueno <ueno@gnu.org>2018-07-16 09:12:20 +0200
commitc53888a802eed4baa4aff54060334d2fdbfc7648 (patch)
treea2b7b5bf687d2acffe9cf0c8f37396d0015b0fb6 /common/compat.h
parent53a7e915b2694bc1957d98493a7aee9abfa3c6c5 (diff)
build: Make reallocarray detection robuster
On NetBSD, reallocarray is not declared until _OPENBSD_SOURCE is defined. Reported by Patrick Welche in: https://lists.freedesktop.org/archives/p11-glue/2018-July/000691.html
Diffstat (limited to 'common/compat.h')
-rw-r--r--common/compat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/compat.h b/common/compat.h
index d78db0c..1b36673 100644
--- a/common/compat.h
+++ b/common/compat.h
@@ -258,7 +258,7 @@ char * strndup (const char *data,
#endif /* HAVE_STRDUP */
-#ifndef HAVE_REALLOCARRAY
+#if defined HAVE_DECL_REALLOCARRAY && !HAVE_DECL_REALLOCARRAY
void * reallocarray (void *ptr,
size_t nmemb,