The sys/fcntl.h is not a POSIX one. We do have fcntl.h header and all sys/*.h specified by OpenGroup, but not the Linux ones.
Just skip it on Haiku:
src/headers.h:92:
#ifdef HAVE_SYS_FCNTL_H
#include <sys/fcntl.h>
#endif /* HAVE_SYS_FCNTL_H */
And all will compile fine.
The testsuite compile failed, though.
So, I guess this software must be ported and patched, indeed.
Here what I’ve done quickly to build it (except testsuite) with gcc4:
cd anubis-4.1.1
$ cp /boot/common/share/libtool/config/config.* build/.
$ libtoolize --force --copy --install
...
$ configure --prefix=/boot/common
...
$ make
...
As stated, it failed in testsuite, but the anubis lib and binary build:
$ src/anubis --version
anubis (GNU Anubis 4.1.1)
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008 The Anubis Team.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ src/anubis --help
Usage: anubis [OPTION]...
SMTP message submission daemon.
-b, --bind=[HOST:]PORT Specify the TCP port on which GNU Anubis listens
for connections; the default HOST is INADDR_ANY,
and default PORT is 24 (private mail system)
-r, --remote-mta=[HOST:]PORT
Specify a remote SMTP host name or IP address;
the default is 25
-l, --local-mta=FILE Execute a local SMTP server, which works on
standard input and output (inetd-type program);
this option excludes the `--remote-mta' option
-m, --mode=MODE Select operation mode; MODE is one of
"transparent", "auth" or "mda"
-f, --foreground Foreground mode
--from=EMAIL Specify sender address (implies MDA mode)
-i, --stdio Use the SMTP protocol (OMP/Tunnel) as described
in RFC 821 on standard input and output
Output options
-s, --silent Work silently
-v, --verbose Work noisily
-D, --debug Debug mode
Miscellaneous options
--altrc=FILE Specify alternate system configuration file
--norc Ignore system configuration file
-c, --check-config=DEBUG-LEVEL
Run the configuration file syntax checker
--show-config-options Print a list of configuration options used to
build GNU Anubis
--relax-perm-check Do not check user configuration file permissions
--pid-file=FILE Store the PID of the running daemon in FILE
Other options
-h, --help Give this help list
--usage Give a short usage message
--version Print program version
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
Report bugs to .
$
You may find more help to port the right-way this software to Haiku here:
http://ports.haiku-files.org