I just pulled down the latest WAZUH sources and compiled them on a fresh install of FreeBSD 10.3. The installation was done as an OSSEC server. When the install script got to compile the file
src/remoted/secure.c, it failed due to a missing
<sys/epoll.h> (which is a Linux include file that is not found on FreeBSD).
The code is setup so that if __MACH__ is not defined, the system is assumed to be Linux and the sys/epoll.h code is used. Unfortunately, FreeBSD does not define the __MACH__ macro either, which is why the compiler error happens. However, FreeBSD does define __FreeBSD__ as a macro that is available at all times. This allowed me to get around the compile time error by adding the following code to the top of the program (just after the comment block):
With this change, when src/remoted/secure.c is compiled, the __MACH__ macro gets defined properly on FreeBSD systems and the compiler error that was triggered by the missing <sys/epoll.h> header no longer occurs. You might want to add this small change to the code base. Thank you. Best,
Dave Stoddard
Network Alarm Corporation