The following are a set of patches for smithsnmp related to its cflags parsing and endianess conversions. Those are needed to make smithsnmp usable when cross compiling it, for instance via in OpenWrt.
Patches first two patches (4e44b11, 76c6ddb) are simplifications and reduce the usage the custom HTON/NTOH macros. The third patch fixes message parsing issues observed on big endian machines (2919a96) and also replaces the remaining, custom HTON/NTOH byteswap macros with byteswap macros provided by the OS. The remaining four patches for scons fixes cross compiling and allows providing endianess from the build system via CCFLAGS or CFLAGS.
They were tested both on a big endian board (8devices Lima, MIPS) and a little endian board (Wallys DR4029, armv7l) with OpenWrt 17 (LEDE) and OpenWrt 19.07. The former needs a backport for the -iremap gcc flag - "build: Pass -iremap gcc option as a single argument"
The following are a set of patches for smithsnmp related to its cflags parsing and endianess conversions. Those are needed to make smithsnmp usable when cross compiling it, for instance via in OpenWrt.
Patches first two patches (4e44b11, 76c6ddb) are simplifications and reduce the usage the custom HTON/NTOH macros. The third patch fixes message parsing issues observed on big endian machines (2919a96) and also replaces the remaining, custom HTON/NTOH byteswap macros with byteswap macros provided by the OS. The remaining four patches for scons fixes cross compiling and allows providing endianess from the build system via CCFLAGS or CFLAGS.
They were tested both on a big endian board (8devices Lima, MIPS) and a little endian board (Wallys DR4029, armv7l) with OpenWrt 17 (LEDE) and OpenWrt 19.07. The former needs a backport for the -iremap gcc flag - "build: Pass -iremap gcc option as a single argument"