The messages here have all pointed to the correct place in the code, sffuncs.h. This issue in fact raises an interesting "strategic" question which I have been pondering: are big-endian platforms now effectively dead? if so, all that code can be eliminated (including a lot of dependent code in sfsys) and let it assume the host machine will always be little-endian. This would be an problem however if anyone hopes to build for a cherished PowerPC machine such as an old G5.
In the meantime, the solution needs to use a symbol that is also used in the relevant CMakeLists.txt file. On the Mac the simplest solution would be to add || defined(MAC) in the sffuncs.h line, as that is used in all the CMakeLists.txt files throughout CDP. If supporting big-endian platforms remains important, some new symbol can be defined such as __ARM64, to be used in both places.
Those building CDP8 from source from Github may like to consider posting questions such as this (which are not about "installation" issues as such) directly via the Github message system. I will receive these immediately through email, and can respond accordingly. This doesn't require anyone to be "registered" as a developer. I have already answered quite a few queries this way.