The HardenedBSD ports tree by default attempts to compile every application with PIE. This means that we pass in via the environment custom CFLAGS, CXXFLAGS, and LDFLAGS:
CFLAGS+= -fPIC -fPIE
CXXFLAGS+= -fPIC -fPIE
LDFLAGS+= -pie
This allows applications to take full advantage of ASLR. I'm having trouble making out how the ossec build process works, but it seems to me that it doesn't obey custom CFLAGS/CXXFLAGS/LDFLAGS.