The wcstoll definition in wchar.h is guarded with __LONG_LONG_SUPPORTED macro.

"The right (tm)" way of enabling it would be to make sure correct compiler options (-std=c99 or whatever) are selected during configuration, but quick hack of adding CXXFLAGS=-D__LONG_LONG_SUPPORTED in port Makefile worked fine for me ...