[flashrom] [patch] more NetBSD fixes (w/ patch)
Jonathan A. Kollasch
jakllsch at kollasch.net
Mon Feb 15 16:56:03 CET 2010
Cast input to tolower() to unsigned char to work around how tolower() is
implemented on NetBSD.
Also, use CPPFLAGS (rather than overriding CFLAGS) for the
NetBSD/DragonFly build example.
Signed-off-by: Jonathan A. Kollasch <jakllsch at kollasch.net>
---
-------------- next part --------------
Index: dummyflasher.c
===================================================================
--- dummyflasher.c (revision 904)
+++ dummyflasher.c (working copy)
@@ -38,7 +38,8 @@
programmer_param = strdup("parallel,lpc,fwh,spi");
/* Convert the parameters to lowercase. */
for (i = 0; programmer_param[i] != '\0'; i++)
- programmer_param[i] = (char)tolower(programmer_param[i]);
+ programmer_param[i] =
+ (char)tolower((unsigned char)programmer_param[i]);
buses_supported = CHIP_BUSTYPE_NONE;
if (strstr(programmer_param, "parallel")) {
Index: README
===================================================================
--- README (revision 904)
+++ README (working copy)
@@ -68,7 +68,7 @@
To compile on NetBSD or DragonFly BSD, use:
ln -s /usr/pkg/include/pciutils pci
- gmake CFLAGS=-I. LDFLAGS="-L/usr/pkg/lib -Wl,-rpath-link,/usr/pkg/lib"
+ gmake CPPFLAGS=-I. LDFLAGS="-L/usr/pkg/lib -Wl,-rpath-link,/usr/pkg/lib"
To compile and run on Darwin/Mac OS X:
More information about the flashrom
mailing list