It’s not THAT hard to make a cli C program portable between windows, Mac and Linux. I’ve done plenty of projects that support all three platforms and the amount of work wasn’t excessive. For some projects it was just getting the build environment up that was the biggest issue.
Once you use cmake, modular design etc a lot of the issues vanish.