@barracuda156 What exactly are you doing - are you trying to build Geany itself or something within Geany? The official instructions for building Geany are here:
Geany itself from the MacPorts portfile.
The error is caused by a mismatching declaration in dirent header. MacOS had a different one prior to 10.8.