Fixing BIND 9.9.0 compilation on OpenBSD
Compiling the new BIND Version 9.9.0 can lead to an compilation error on systems that do not have the ENOTSUP constant defined (such as OpenBSD).
stdio.c: In function `isc_stdio_sync': stdio.c:117: error: `ENOTSUP' undeclared (first use in this function) stdio.c:117: error: (Each undeclared identifier is reported only once stdio.c:117: error: for each function it appears in.) *** Error code 1 Stop in /usr/src/bind-9.9.0/lib/isc/unix. *** Error code 1 Stop in /usr/src/bind-9.9.0/lib/isc (line 174 of Makefile). *** Error code 1 Stop in /usr/src/bind-9.9.0/lib (line 103 of Makefile). *** Error code 1 Stop in /usr/src/bind-9.9.0 (line 107 of Makefile).
ISC has already applied a patch that will be out with the next version(s). For all that want to compile and run BIND 9.9.0 now, below is a patch that works for me:
*** /usr/src/bind-9.9.0/lib/isc/include/isc/stdio.h.orig Wed Feb 29 21:04:43 2012 --- /usr/src/bind-9.9.0/lib/isc/include/isc/stdio.h Wed Feb 29 21:05:34 2012 *************** *** 22,27 **** --- 22,32 ---- /*! \file isc/stdio.h */ + /* OpenBSD doesn't have ENOTSUP, but does have EOPNOTSUPP */ + #if defined (EOPNOTSUPP) && !defined (ENOTSUP) + #define ENOTSUP EOPNOTSUPP + #endif + /*% * These functions are wrappers around the corresponding stdio functions. *