r4917 - trunk/src/host/dfu-util/src

werner at docs.openmoko.org werner at docs.openmoko.org
Mon Feb 9 02:50:55 CET 2009


Author: werner
Date: 2009-02-09 02:50:55 +0100 (Mon, 09 Feb 2009)
New Revision: 4917

Modified:
   trunk/src/host/dfu-util/src/main.c
   trunk/src/host/dfu-util/src/sam7dfu.c
Log:
Date: Sat, 7 Feb 2009 16:51:02 +0000
From: Bruce Cran <bruce at cran.org.uk>
To: openmoko-kernel at lists.openmoko.org
Subject: dfu-util: missing includes

I've been porting dfu-util to work with FreeBSD using the new USB stack
and the libusb 0.1 compatibility layer.  While it builds and runs, I
noticed a few compiler warnings because libusb20_compat01.h doesn't
include unistd.h and stdlib.h: src/main.c needs stdlib.h and unistd.h
while src/sam7dfu.c just needs unistd.h - they should ideally be
explicitly included instead of picking them up from libusb.



Modified: trunk/src/host/dfu-util/src/main.c
===================================================================
--- trunk/src/host/dfu-util/src/main.c	2009-02-08 22:40:21 UTC (rev 4916)
+++ trunk/src/host/dfu-util/src/main.c	2009-02-09 01:50:55 UTC (rev 4917)
@@ -21,7 +21,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <stdlib.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <string.h>
 #include <getopt.h>
 #include <usb.h>

Modified: trunk/src/host/dfu-util/src/sam7dfu.c
===================================================================
--- trunk/src/host/dfu-util/src/sam7dfu.c	2009-02-08 22:40:21 UTC (rev 4916)
+++ trunk/src/host/dfu-util/src/sam7dfu.c	2009-02-09 01:50:55 UTC (rev 4917)
@@ -6,6 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>




More information about the commitlog mailing list