Mario Limonciello has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/35155 )
Change subject: libflashrom.h: Add types not included in all projects ......................................................................
libflashrom.h: Add types not included in all projects
Fixes this in fwupd: ``` cc -Iplugins/flashrom/1ac62b6@@fu_plugin_flashrom@sha -Iplugins/flashrom -I../plugins/flashrom -Iplugins/flashrom/../.. -I../plugins/flashrom/../.. -Iplugins/flashrom/../../src -I../plugins/flashrom/../../src -Iplugins/flashrom/../../libfwupd -I../plugins/flashrom/../../libfwupd -Isubprojects/flashrom -I../subprojects/flashrom -Isrc -I/usr/include/libxmlb-1 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/gusb-1 -I/usr/include/libusb-1.0 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/gudev-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/libftdi1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c99 -g -fstack-protector-strong -Waggregate-return -Wunused -Warray-bounds -Wcast-align -Wclobbered -Wdeclaration-after-statement -Wduplicated-branches -Wduplicated-cond -Wempty-body -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wignored-qualifiers -Wimplicit-function-declaration -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs -Wno-cast-function-type -Wno-address-of-packed-member -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-discarded-qualifiers -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-suggest-attribute=format -Wno-unused-parameter -Wnull-dereference -Wold-style-definition -Woverride-init -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch-default -Wtype-limits -Wundef -Wuninitialized -Wunused-but-set-variable -Wunused-variable -Wvla -Wwrite-strings -D_DEFAULT_SOURCE -DFWUPD_DISABLE_DEPRECATED -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -fPIC -pthread '-DG_LOG_DOMAIN="FuPluginFlashrom"' '-DLOCALSTATEDIR="/usr/local/var"' -MD -MQ 'plugins/flashrom/1ac62b6@@fu_plugin_flashrom@sha/fu-plugin-flashrom.c.o' -MF 'plugins/flashrom/1ac62b6@@fu_plugin_flashrom@sha/fu-plugin-flashrom.c.o.d' -o 'plugins/flashrom/1ac62b6@@fu_plugin_flashrom@sha/fu-plugin-flashrom.c.o' -c ../plugins/flashrom/fu-plugin-flashrom.c In file included from ../plugins/flashrom/fu-plugin-flashrom.c:27: ../subprojects/flashrom/libflashrom.h:57:72: error: unknown type name ‘bool’ 57 | void flashrom_flag_set(struct flashrom_flashctx *, enum flashrom_flag, bool value); | ^~~~ ../subprojects/flashrom/libflashrom.h:58:1: error: unknown type name ‘bool’ 58 | bool flashrom_flag_get(const struct flashrom_flashctx *, enum flashrom_flag); | ^~~~ ../subprojects/flashrom/libflashrom.h:69:37: error: unknown type name ‘uint8_t’ 69 | struct flashrom_flashctx *, const uint8_t *buf, size_t len); | ^~~~~~~ ```
Signed-off-by: Mario Limonciello mario.limonciello@dell.com Change-Id: Ib48ddc6412f82677f43e445346dc64ccfadf2423 --- M libflashrom.h 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/35155/1
diff --git a/libflashrom.h b/libflashrom.h index 38c95d2..ed42d6d 100644 --- a/libflashrom.h +++ b/libflashrom.h @@ -20,6 +20,8 @@
#include <sys/types.h> #include <stddef.h> +#include <stdbool.h> +#include <cstdint.h> #include <stdarg.h>
int flashrom_init(int perform_selfcheck);
Jacob Garber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/35155 )
Change subject: libflashrom.h: Add types not included in all projects ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/flashrom/+/35155/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/35155/1//COMMIT_MSG@22 PS1, Line 22: ``` Including this huge error message isn't necessary, you can just say that <stdbool.h> and <stdint.h> need to be included for it to compile.
https://review.coreboot.org/c/flashrom/+/35155/1/libflashrom.h File libflashrom.h:
https://review.coreboot.org/c/flashrom/+/35155/1/libflashrom.h@24 PS1, Line 24: cstdint.h cstdint is a C++ header, you'll want to just use <stdint.h>
Hello Paul Menzel, David Hendricks, build bot (Jenkins), Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/35155
to look at the new patch set (#2).
Change subject: libflashrom.h: Add types not included in all projects ......................................................................
libflashrom.h: Add types not included in all projects
Add <stdbool.h> and <stdint.h> to allow compilation in fwupd.
Signed-off-by: Mario Limonciello mario.limonciello@dell.com Change-Id: Ib48ddc6412f82677f43e445346dc64ccfadf2423 --- M libflashrom.h 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/35155/2
Jacob Garber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/35155 )
Change subject: libflashrom.h: Add types not included in all projects ......................................................................
Patch Set 2: Code-Review+2
Mario Limonciello has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/35155 )
Change subject: libflashrom.h: Add types not included in all projects ......................................................................
Patch Set 3:
Can this be merged now?
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/35155 )
Change subject: libflashrom.h: Add types not included in all projects ......................................................................
Patch Set 3:
Patch Set 3:
Can this be merged now?
Yes. Do you see a "Submit" button in the upper right corner now? If not, I'll go ahead and merge it for you.
Mario Limonciello has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/35155 )
Change subject: libflashrom.h: Add types not included in all projects ......................................................................
Patch Set 3:
I do see where it should be but it's "greyed" out.
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/35155 )
Change subject: libflashrom.h: Add types not included in all projects ......................................................................
Patch Set 3:
Hmm, for some reason I thought patch owners could submit their patches once they are +2'd. I'll ask the admin next time I chat with him. Sorry for the delay.
David Hendricks has submitted this change. ( https://review.coreboot.org/c/flashrom/+/35155 )
Change subject: libflashrom.h: Add types not included in all projects ......................................................................
libflashrom.h: Add types not included in all projects
Add <stdbool.h> and <stdint.h> to allow compilation in fwupd.
Signed-off-by: Mario Limonciello mario.limonciello@dell.com Change-Id: Ib48ddc6412f82677f43e445346dc64ccfadf2423 Reviewed-on: https://review.coreboot.org/c/flashrom/+/35155 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Jacob Garber jgarber1@ualberta.ca --- M libflashrom.h 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Jacob Garber: Looks good to me, approved
diff --git a/libflashrom.h b/libflashrom.h index a0da6df..d0d5826 100644 --- a/libflashrom.h +++ b/libflashrom.h @@ -20,6 +20,8 @@
#include <sys/types.h> #include <stddef.h> +#include <stdbool.h> +#include <stdint.h> #include <stdarg.h>
int flashrom_init(int perform_selfcheck);