The mainline code has improved since 5.4.9 - so that it "almost" successfully builds in subdirectories: ref: https://support.zabbix.com/browse/ZBX-20471
Patches 002, 003 and 005 can/should be applied to mainline.
With 001 a workaround - as it would be better to fix the location of config.h (as in some of the other files - e.g. as CONFIG_HEADER):
Patches 002, 003 and 005 can/should be applied to mainline.
With 001 a workaround - as it would be better to fix the location of config.h (as in some of the other files - e.g. as CONFIG_HEADER):