MacOS doesn't come with malloc.h, and both MacOS and openbsd point to including stdlib.h instead, so something along these lines perhaps:
diff --git a/src/skill.c b/src/skill.c
index 8ac2cc53..527cdbf7 100644
--- a/src/skill.c
+++ b/src/skill.c
@@ -25,9 +25,11 @@
#include <assert.h>
#include <config.h>
-//#ifdef HAVE_MALLOC_H
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
-//#endif
+#else
+#include <stdlib.h>
+#endif
#include <string.h>
static void skill_del(struct skill *skill)
Thanks, will have a look at this and your other patch maybe tonight.
----- Original Message -----
From: "Janne Johansson" icepic@users.sf.net
To: "Ticket 5" 5@patches.nazghul.p.re.sf.net
Sent: Monday, June 5, 2017 6:27:51 AM
Subject: [nazghul:patches] #5 malloc.h missing on macos, deprecated on other BSDs too.
[patches:#5] malloc.h missing on macos, deprecated on other BSDs too.
Status: open
Group: Unstable (example)
Labels: bsd
Created: Mon Jun 05, 2017 12:27 PM UTC by Janne Johansson
Last Updated: Mon Jun 05, 2017 12:27 PM UTC
Owner: nobody
MacOS doesn ' t come with malloc . h , and both MacOS and openbsd point to including stdlib . h instead , so something along these lines perhaps : diff -- git a / src / skill . c b / src / skill . c index 8 ac2cc53 . .527 cdbf7 100644 --- a / src / skill . c +++ b / src / skill . c @@ - 25 , 9 + 25 , 11 @@ #include <assert.h> #include <config.h> - //#ifdef HAVE_MALLOC_H + # ifdef HAVE_MALLOC_H #include <malloc.h> - //#endif + # else + # include < stdlib . h > + # endif #include <string.h> static void skill_del ( struct skill * skill ) </string.h></malloc.h></config.h></assert.h>
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/nazghul/patches/5/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Patches:
#5Applied similar with 5f39b26