MINOR: fd: Use closefrom() as my_closefrom() if supported.
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 25 Feb 2019 13:26:54 +0000 (14:26 +0100)
committerOlivier Houchard <cognet@ci0.org>
Mon, 25 Feb 2019 15:51:03 +0000 (16:51 +0100)
commit2292edf67c03d22c2d2bbe14fbe29b7e677d49ff
treece4497070dd30f86de46edea15806b98c2f2d8cb
parentd16a9dfed80e75d730754b717370515265698cdd
MINOR: fd: Use closefrom() as my_closefrom() if supported.

Add a new option, USE_CLOSEFROM. If set, it is assumed the system provides
a closefrom() function, so use it.
It is only implicitely used on FreeBSD for now, it should work on
OpenBSD/NetBSD/DragonflyBSD/Solaris too, but as I have no such system to
test it, I'd rather leave it disabled by default. Users can add USE_CLOSEFROM
explicitely on their make command line to activate it.
Makefile
src/fd.c