From af2ba601f4840172eb422a0f3efb5a740fb9698d Mon Sep 17 00:00:00 2001 From: Anastasia Klimchuk Date: Mon, 17 Oct 2022 11:59:09 +1100 Subject: tests: Add prefix to io_mock functions not to clash with macros Flashrom I/O mock functions need to be renamed so that they do not have name clash with standard I/O, because the latter are allowed to be macros. Adding a prefix to flashrom mock functions avoids them being accidentally expanded. Standard I/O functions are expanded and flashrom mocks stay as they are. BUG=b:237606255 TEST=ninja test 1) gcc 12.2.0 on Debian 2) clang 15.0 on Chromium OS Ticket: https://ticket.coreboot.org/issues/411 Change-Id: I7998a8fb1b9e65621e12adbfab5460a245d5606b Signed-off-by: Anastasia Klimchuk Reviewed-on: https://review.coreboot.org/c/flashrom/+/68433 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer --- tests/realtek_mst_i2c_spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/realtek_mst_i2c_spi.c') diff --git a/tests/realtek_mst_i2c_spi.c b/tests/realtek_mst_i2c_spi.c index 0526124df..753f06b91 100644 --- a/tests/realtek_mst_i2c_spi.c +++ b/tests/realtek_mst_i2c_spi.c @@ -50,9 +50,9 @@ void realtek_mst_basic_lifecycle_test_success(void **state) .flags = { O_RDWR }, }; const struct io_mock realtek_mst_io = { - .ioctl = realtek_mst_ioctl, - .read = realtek_mst_read, - .write = realtek_mst_write, + .iom_ioctl = realtek_mst_ioctl, + .iom_read = realtek_mst_read, + .iom_write = realtek_mst_write, .fallback_open_state = &realtek_mst_fallback_open_state, }; -- cgit v1.2.3