DragonFly BSD defines AT_SYMLINK_NOFOLLOW but not AT_SYMLINK_FOLLOW. The attached patch will allow ocamlnet to build on platforms like these, and appropriately disable linkat support.
from: http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/net/ocamlnet/patches/patch-src_netsys_netsys__c.c?rev=1.1
There is another mistake, as AT_SYMLINK_FOLLOW cannot be specified from OCaml. If unavailable, it is now assumed to be 0, which should also fix the Dragonfly problem. (Btw, in the manual page AT_SYMLINK_FOLLOW is documented. Maybe this changed, and Dragonfly follows the POSIX spec now.)
Fixed in branch "onet4".