X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fdhcpd-pools.c;fp=src%2Fdhcpd-pools.c;h=717743d6351eac89247d7c7afefa38972627ce2c;hb=ff572a4a55cd3d693d5e5b3f0a9757b6b9088017;hp=a27724d042e27759bd4100ec75c64e53047166d9;hpb=1d308d8de94033d982c08ea6fd21e94c64c8e346;p=debian%2Fdhcpd-pools.git diff --git a/src/dhcpd-pools.c b/src/dhcpd-pools.c index a27724d..717743d 100644 --- a/src/dhcpd-pools.c +++ b/src/dhcpd-pools.c @@ -36,6 +36,7 @@ extern char *malloc(); #include #endif #include +#include #include "dhcpd-pools.h" #include "defaults.h" @@ -262,6 +263,13 @@ int main(int argc, char **argv) } free(tmp_ranges); output_analysis(); + /* After fopen in ouput ioctl does like /dev/null which + * cause ENOTTY, and clean_up will see that without this + * reset. At least linux does this, and possibly some + * other systems. There's a report from FreeBSD 8.0 which + * matches quite well with the symptom. */ + if (errno == 25) + errno = 0; if ((config.output_format[0] == 'x') || (config.output_format[0] == 'X')) {