Program with scanf %m is not portable-Collection of common programming errors
When running the program you need a libc that is compatible with the functionality you are using. If you are using non-standard extensions, you need to check the documentation for the target platform and make sure it supports the same extension.
The best way to avoid such problems is to avoid using extensions. By sticking to the standard you increase the portability of your program.
Also, compile the program locally on each platform. A lot of the differences between different platforms are handled in the standard #include
files, which means that even if the code is portable, the binaries often aren’t.