>>>>> Kirill Levchenko <[email protected]> writes:
> Does not compile without USB support because the necessary headers
> are not included for the dummy pickit2_initpgm and
> pickit2_nousb_open.
> Attached patch fixes it by moving #if after the includes.
FWIW, I can confirm this issue. A slightly more verbose patch
would be to move only the necessary #include's above the #if
(that'd be my personal preference), or, alternatively, to
duplicate these #include's below the respective #else, like:
--- pickit2.c.~1~ 2012-12-02 08:20:59.859669319 +0000
+++ pickit2.c
@@ -1338,7 +1338,14 @@
strncpy(pgm->type, "pickit2", sizeof(pgm->type));
}
#else
+#include <stdio.h> /* for fprintf () */
+#include <stdlib.h> /* for exit () */
+#include <string.h> /* for strncpy () */
+
+#include "avrdude.h" /* for progname */
+#include "pgm.h" /* for PROGRAMMER */
+
static int pickit2_nousb_open (struct programmer_t *pgm, char * name) {
fprintf(stderr,
#ifdef WIN32NATIVE
"%s: error: no usb or hid support. Please compile again with
libusb or HID support from Win32 DDK installed.\n",
[…]
--
FSF associate member #7257
_______________________________________________
avrdude-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev