The last snapshot (1281) of kopano core does not build memory.hpp on OpenBSD/amd64 because ctype ends up being included (I think through cwtype) which already define _U and the like (used for templates in the header file).
According to the C and C++ standard names starting with underscore uppercase letter are reserved. Is there anything wrong with using T instead of _T, U instead of _U and so on and so forth? I see no problem with that on my system.
For a full diff checkout this link. Can this be applied to the official tree? (Actually now that I look at it there is also __p and other stuff that this patch does not fix. Sigh.)