Patchwork libobjc - added some missing includes to prevent warnings

login
register
mail settings
Submitter Nicola Pero
Date Nov. 18, 2010, 2:12 a.m.
Message ID <1290046327.296325736@192.168.2.227>
Download mbox | patch
Permalink /patch/72029/
State New
Headers show

Comments

Nicola Pero - Nov. 18, 2010, 2:12 a.m.
Committed to trunk.

Thanks

Patch

Index: protocols.c
===================================================================
--- protocols.c (revision 166888)
+++ protocols.c (working copy)
@@ -28,7 +28,9 @@  see the files COPYING3 and COPYING.RUNTIME respect
 #include "objc/thr.h"
 #include "objc-private/runtime.h"      /* the kitchen sink */
 #include "objc-private/hash.h"         /* For the hash table of protocols.  */
-#include "objc-private/protocols.h"    /* For __objc_protocols_init() and __objc_protocols_add_protocol() */
+#include "objc-private/protocols.h"    /* For __objc_protocols_init() and
+                                          __objc_protocols_add_protocol().  */
+#include <stdlib.h>                    /* For malloc.  */
 
 /* This is a table that maps a name to a Protocol instance with that
    name.  Because there may be multiple Protocol instances with the
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 166888)
+++ ChangeLog   (working copy)
@@ -1,3 +1,8 @@ 
+2010-11-18  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * ivars.c: Include stdlib.h.
+       * protocols.c: Same change.
+
 2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * Makefile.in (OBJC_SOURCE_FILES): Added accessors.m.
Index: ivars.c
===================================================================
--- ivars.c     (revision 166888)
+++ ivars.c     (working copy)
@@ -27,7 +27,8 @@  see the files COPYING3 and COPYING.RUNTIME respect
 #include "objc-private/module-abi-8.h" /* For runtime structures  */
 #include "objc/thr.h"
 #include "objc-private/runtime.h"      /* the kitchen sink */
-#include <string.h>                    /* For strcmp */
+#include <string.h>                    /* For strcmp.  */
+#include <stdlib.h>                    /* For malloc.  */
 
 struct objc_ivar *
 class_getInstanceVariable (Class class_, const char *name)