--- internfile/mh_xslt.cpp.orig	2021-02-02 09:08:06.094415813 +0100
+++ internfile/mh_xslt.cpp	2021-02-02 09:08:24.598257255 +0100
@@ -14,11 +14,15 @@
  *   Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 #include "autoconfig.h"
 
+#if defined(HAVE_MALLOC_H)
 #include <malloc.h>
+#elif defined(HAVE_MALLOC_MALLOC_H)
+#include <malloc/malloc.h>
+#endif
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxslt/transform.h>
 #include <libxslt/xsltInternals.h>
