diff --git a/src/pf.c b/src/pf.c
index 0fff6720706966c3ab9c351eedee0a23e60c23f1..0332c3c1b3a4c7ee62d54b081bdcdf087960273d 100644 (file)
--- a/src/pf.c
+++ b/src/pf.c
#include <err.h>
#include <pwd.h>
+#ifndef FCNT_NAMES
+# if FCNT_MAX != 3
+# error "Unexpected value for FCNT_MAX"
+# endif
+# define FCNT_NAMES {"search", "insert", "removals", NULL};
+#endif
+
+#ifndef SCNT_NAMES
+# if SCNT_MAX != 3
+# error "Unexpected value for SCNT_MAX"
+# endif
+# define SCNT_NAMES {"search", "insert", "removals", NULL};
+#endif
+
static char const *pf_reasons[PFRES_MAX+1] = PFRES_NAMES;
static char const *pf_lcounters[LCNT_MAX+1] = LCNT_NAMES;
static char const *pf_fcounters[FCNT_MAX+1] = FCNT_NAMES;
-static char const *pf_scounters[FCNT_MAX+1] = FCNT_NAMES;
+static char const *pf_scounters[SCNT_MAX+1] = SCNT_NAMES;
static char const *pf_device = "/dev/pf";