Skip to contentSkip to conversation

dtc: Correct headers in util.c

PATCH Applied David Gibson 2 participants 2 messages Mar 3, 2010

lore
Share & tools
lore
#0 lore raw

Since util.c is used in programs other than full dtc, it shouldn't include the full dtc.h, just util.h which has prototypes directly relevant to it. This patch makes the change, and also adds includes of the necessary system headers which were previously included indirectly by dtc.h.

util.c +6 -1
Index: dtc/util.c
===================================================================
@@ -17,7 +17,12 @@
  *                                                                   USA
  */
 
-#include "dtc.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "util.h"
 
 char *xstrdup(const char *s)
 {
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Applied
#1 lore raw
Quoted 7 lines

Since util.c is used in programs other than full dtc, it shouldn't include the full dtc.h, just util.h which has prototypes directly relevant to it. This patch makes the change, and also adds includes of the necessary system headers which were previously included indirectly by dtc.h.

Applied.

Thanks,
jdl