]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Allow commandline.c to compile on Solaris
authorMichal Nowak <mnowak@isc.org>
Fri, 30 May 2025 08:22:48 +0000 (10:22 +0200)
committerMichal Nowak <mnowak@isc.org>
Mon, 2 Jun 2025 09:00:48 +0000 (09:00 +0000)
commandline.c failed to compile on Solaris because NAME_MAX was
undefined.  Include 'isc/dir.h' which defines NAME_MAX for platforms
that don't define it.

    In file included from commandline.c:54:
    ./include/isc/commandline.h:31:38: error: 'NAME_MAX' undeclared here (not in a function)
       31 | extern char isc_commandline_progname[NAME_MAX];
          |                                      ^~~~~~~~

lib/isc/include/isc/commandline.h

index dfa8430d3f2c4b3f1384d5136b67ceb6c68e3af8..a7895a800fd1ba33819f1e318c79eefca58d1668 100644 (file)
@@ -18,6 +18,7 @@
 #include <limits.h>
 #include <stdbool.h>
 
+#include <isc/dir.h>
 #include <isc/result.h>
 #include <isc/types.h>