[PATCH v2 17/25] Including <malloc_np.h> iff it exists.

Alejandro Colomar alx.manpages at gmail.com
Mon Jun 20 07:11:00 UTC 2022


---
 auto/headers   | 13 +++++++++++++
 src/nxt_unix.h |  4 ++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/auto/headers b/auto/headers
index 7ae572d5..9f528caa 100644
--- a/auto/headers
+++ b/auto/headers
@@ -16,6 +16,19 @@ nxt_feature_test="#include <linux/openat2.h>
 . auto/feature
 
 
+nxt_feature="<malloc_np.h>"
+nxt_feature_name=NXT_HAVE_MALLOC_NP_H
+nxt_feature_run=no
+nxt_feature_incs=
+nxt_feature_libs=
+nxt_feature_test="#include <malloc_np.h>
+
+                  int main(void) {
+                      return 0;
+                  }"
+. auto/feature
+
+
 nxt_feature="<mntent.h>"
 nxt_feature_name=NXT_HAVE_MNTENT_H
 nxt_feature_run=no
diff --git a/src/nxt_unix.h b/src/nxt_unix.h
index 2fe784c0..7f9a2914 100644
--- a/src/nxt_unix.h
+++ b/src/nxt_unix.h
@@ -45,8 +45,8 @@
 
 #if (NXT_FREEBSD)
 
-#if (NXT_HAVE_MALLOC_USABLE_SIZE)
-#include <malloc_np.h>              /* malloc_usable_size(). */
+#if (NXT_HAVE_MALLOC_NP_H)
+#include <malloc_np.h>
 #endif
 
 #if (__FreeBSD_version >= 900007)
-- 
2.36.1



More information about the unit mailing list