ifdtool: Add O_BINARY to open flags for Windows compatibility

Hardware / Coreboot - Scott Duplichan [notabs.org] - 19 December 2014 11:55 UTC

Windows requires O_BINARY when opening a binary file. Otherwise \n characters get expanded to \r\n and z is treated as end of file. For compatibility with non-Windows hosts, the patch defines O_BINARY if it is not already defined.

Change-Id: I04cd609b644b1edbe9104153b43b9996811ffd38

f2c9837 ifdtool: Add O_BINARY to open flags for Windows compatibility
util/ifdtool/ifdtool.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

Upstream: review.coreboot.org


  • Share