summaryrefslogtreecommitdiff
path: root/src/unexmacosx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unexmacosx.c')
-rw-r--r--src/unexmacosx.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index f755f7fafd9..5584e693f75 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -85,17 +85,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
be changed accordingly.
*/
-/* config.h #define:s malloc/realloc/free and then includes stdlib.h.
- We want the undefined versions, but if config.h includes stdlib.h
- with the #define:s in place, the prototypes will be wrong and we get
- warnings. To prevent that, include stdlib.h before config.h. */
-
-#include <stdlib.h>
#include <config.h>
+
+/* Although <config.h> redefines malloc to unexec_malloc, etc., this
+ file wants stdlib.h to declare the originals. */
#undef malloc
#undef realloc
#undef free
+#include <stdlib.h>
+
#include "unexec.h"
#include "lisp.h"