[PATCH 02/15] <net-snmp/library/tools.h>: Add a missing #include directive

Bart Van Assche <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <[email protected]>
Since PATH_MAX and MAXPATHLEN are used in this header file, include
the header file that defines these constants.
---
 include/net-snmp/library/tools.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/net-snmp/library/tools.h b/include/net-snmp/library/tools.h
index 19752d7491f4..7a099a5551f1 100644
--- a/include/net-snmp/library/tools.h
+++ b/include/net-snmp/library/tools.h
@@ -16,6 +16,9 @@
 #ifdef HAVE_INTTYPES_H
 #include <inttypes.h> /* uintptr_t */
 #endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h> /* PATH_MAX (Linux), MAXPATHLEN (BSD) */
+#endif
 
 #ifdef __cplusplus
 extern          "C" {
@@ -24,7 +27,7 @@ extern          "C" {
 
 
     /*
-     * General acros and constants.
+     * General macros and constants.
      */
 #ifdef WIN32
 #  define SNMP_MAXPATH MAX_PATH
-- 
2.16.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.