Index: freebsd/contrib/pf/pfctl/parse.y
===================================================================
--- freebsd/contrib/pf/pfctl/parse.y	(revision c70221cb64185125b4fc97f9c2f15b6b4cf3cf3d)
+++ freebsd/contrib/pf/pfctl/parse.y	(revision 686583cba4f2701185077eab58800741398c3ac2)
@@ -85,5 +85,9 @@
 static int		 default_statelock;
 
+#ifndef __rtems__
 TAILQ_HEAD(files, file)		 files = TAILQ_HEAD_INITIALIZER(files);
+#else /* __rtems__ */
+static TAILQ_HEAD(files, file)	 files = TAILQ_HEAD_INITIALIZER(files);
+#endif /* __rtems__ */
 static struct file {
 	TAILQ_ENTRY(file)	 entry;
@@ -105,5 +109,9 @@
 int		 findeol(void);
 
+#ifndef __rtems__
 TAILQ_HEAD(symhead, sym)	 symhead = TAILQ_HEAD_INITIALIZER(symhead);
+#else /* __rtems__ */
+static TAILQ_HEAD(symhead, sym)	 symhead = TAILQ_HEAD_INITIALIZER(symhead);
+#endif /* __rtems__ */
 struct sym {
 	TAILQ_ENTRY(sym)	 entry;
@@ -202,5 +210,9 @@
 };
 
+#ifndef __rtems__
 struct node_queue {
+#else /* __rtems__ */
+static struct node_queue {
+#endif /* __rtems__ */
 	char			 queue[PF_QNAME_SIZE];
 	char			 parent[PF_QNAME_SIZE];
@@ -216,5 +228,9 @@
 };
 
+#ifndef __rtems__
 struct filter_opts {
+#else /* __rtems__ */
+static struct filter_opts {
+#endif /* __rtems__ */
 	int			 marker;
 #define FOM_FLAGS	0x01
@@ -252,10 +268,18 @@
 } filter_opts;
 
+#ifndef __rtems__
 struct antispoof_opts {
+#else /* __rtems__ */
+static struct antispoof_opts {
+#endif /* __rtems__ */
 	char			*label;
 	u_int			 rtableid;
 } antispoof_opts;
 
+#ifndef __rtems__
 struct scrub_opts {
+#else /* __rtems__ */
+static struct scrub_opts {
+#endif /* __rtems__ */
 	int			 marker;
 #define SOM_MINTTL	0x01
@@ -275,5 +299,9 @@
 } scrub_opts;
 
+#ifndef __rtems__
 struct queue_opts {
+#else /* __rtems__ */
+static struct queue_opts {
+#endif /* __rtems__ */
 	int			marker;
 #define QOM_BWSPEC	0x01
@@ -289,5 +317,9 @@
 } queue_opts;
 
+#ifndef __rtems__
 struct table_opts {
+#else /* __rtems__ */
+static struct table_opts {
+#endif /* __rtems__ */
 	int			flags;
 	int			init_addr;
@@ -295,5 +327,9 @@
 } table_opts;
 
+#ifndef __rtems__
 struct pool_opts {
+#else /* __rtems__ */
+static struct pool_opts {
+#endif /* __rtems__ */
 	int			 marker;
 #define POM_TYPE		0x01
@@ -307,6 +343,11 @@
 
 
+#ifndef __rtems__
 struct node_hfsc_opts	 hfsc_opts;
 struct node_state_opt	*keep_state_defaults = NULL;
+#else /* __rtems__ */
+static struct node_hfsc_opts	 hfsc_opts;
+static struct node_state_opt	*keep_state_defaults = NULL;
+#endif /* __rtems__ */
 
 int		 disallow_table(struct node_host *, const char *);
@@ -353,5 +394,9 @@
 u_int16_t parseicmpspec(char *, sa_family_t);
 
+#ifndef __rtems__
 TAILQ_HEAD(loadanchorshead, loadanchors)
+#else /* __rtems__ */
+static TAILQ_HEAD(loadanchorshead, loadanchors)
+#endif /* __rtems__ */
     loadanchorshead = TAILQ_HEAD_INITIALIZER(loadanchorshead);
 
@@ -5397,8 +5442,15 @@
 #define MAXPUSHBACK	128
 
+#ifndef __rtems__
 char	*parsebuf;
 int	 parseindex;
 char	 pushback_buffer[MAXPUSHBACK];
 int	 pushback_index = 0;
+#else /* __rtems__ */
+static char	*parsebuf;
+static int	 parseindex;
+static char	 pushback_buffer[MAXPUSHBACK];
+static int	 pushback_index = 0;
+#endif /* __rtems__ */
 
 int
Index: freebsd/contrib/pf/pfctl/pfctl.c
===================================================================
--- freebsd/contrib/pf/pfctl/pfctl.c	(revision c70221cb64185125b4fc97f9c2f15b6b4cf3cf3d)
+++ freebsd/contrib/pf/pfctl/pfctl.c	(revision 686583cba4f2701185077eab58800741398c3ac2)
@@ -115,4 +115,5 @@
 #endif /* __rtems__ */
 
+#ifndef __rtems__
 struct pf_anchor_global	 pf_anchors;
 struct pf_anchor	 pf_main_anchor;
@@ -124,9 +125,5 @@
 char		*anchoropt;
 const char	*optiopt = NULL;
-#ifndef __rtems__
 char		*pf_device = "/dev/pf";
-#else /* __rtems__ */
-const char	*pf_device = "/dev/pf";
-#endif /* __rtems__ */
 char		*ifaceopt;
 char		*tableopt;
@@ -136,10 +133,34 @@
 int		 state_killers;
 char		*state_kill[2];
+#else /* __rtems__ */
+static struct pf_anchor_global	 pf_anchors;
+static struct pf_anchor	 pf_main_anchor;
+
+static const char	*clearopt;
+static char		*rulesopt;
+static const char	*showopt;
+static const char	*debugopt;
+static char		*anchoropt;
+static const char	*optiopt = NULL;
+static const char	*pf_device = "/dev/pf";
+static char		*ifaceopt;
+static char		*tableopt;
+static const char	*tblcmdopt;
+static int		 src_node_killers;
+static char		*src_node_kill[2];
+static int		 state_killers;
+static char		*state_kill[2];
+#endif /* __rtems__ */
 int		 loadopt;
 int		 altqsupport;
 
 int		 dev = -1;
+#ifndef __rtems__
 int		 first_title = 1;
 int		 labels = 0;
+#else /* __rtems__ */
+static int	 first_title = 1;
+static int	 labels = 0;
+#endif /* __rtems__ */
 
 #define INDENT(d, o)	do {						\
Index: freebsd/contrib/pf/pfctl/pfctl_altq.c
===================================================================
--- freebsd/contrib/pf/pfctl/pfctl_altq.c	(revision c70221cb64185125b4fc97f9c2f15b6b4cf3cf3d)
+++ freebsd/contrib/pf/pfctl/pfctl_altq.c	(revision 686583cba4f2701185077eab58800741398c3ac2)
@@ -51,6 +51,11 @@
 #define is_sc_null(sc)	(((sc) == NULL) || ((sc)->m1 == 0 && (sc)->m2 == 0))
 
+#ifndef __rtems__
 TAILQ_HEAD(altqs, pf_altq) altqs = TAILQ_HEAD_INITIALIZER(altqs);
 LIST_HEAD(gen_sc, segment) rtsc, lssc;
+#else /* __rtems__ */
+static TAILQ_HEAD(altqs, pf_altq) altqs = TAILQ_HEAD_INITIALIZER(altqs);
+static LIST_HEAD(gen_sc, segment) rtsc, lssc;
+#endif /* __rtems__ */
 
 struct pf_altq	*qname_to_pfaltq(const char *, const char *);
Index: freebsd/contrib/pf/pfctl/pfctl_optimize.c
===================================================================
--- freebsd/contrib/pf/pfctl/pfctl_optimize.c	(revision c70221cb64185125b4fc97f9c2f15b6b4cf3cf3d)
+++ freebsd/contrib/pf/pfctl/pfctl_optimize.c	(revision 686583cba4f2701185077eab58800741398c3ac2)
@@ -93,5 +93,9 @@
     DC,		/* we just don't care about the field */
     NEVER};	/* we should never see this field set?!? */
+#ifndef __rtems__
 struct pf_rule_field {
+#else /* __rtems__ */
+static struct pf_rule_field {
+#endif /* __rtems__ */
 	const char	*prf_name;
 	int		 prf_type;
@@ -249,6 +253,12 @@
 
 
+#ifndef __rtems__
 int (*skip_comparitors[PF_SKIP_COUNT])(struct pf_rule *, struct pf_rule *);
 const char *skip_comparitors_names[PF_SKIP_COUNT];
+#else /* __rtems__ */
+static int (*skip_comparitors[PF_SKIP_COUNT])(struct pf_rule *,
+    struct pf_rule *);
+static const char *skip_comparitors_names[PF_SKIP_COUNT];
+#endif /* __rtems__ */
 #define PF_SKIP_COMPARITORS {				\
     { "ifp", PF_SKIP_IFP, skip_cmp_ifp },		\
@@ -262,6 +272,11 @@
 }
 
+#ifndef __rtems__
 struct pfr_buffer table_buffer;
 int table_identifier;
+#else /* __rtems__ */
+static struct pfr_buffer table_buffer;
+static int table_identifier;
+#endif /* __rtems__ */
 
 
Index: freebsd/contrib/pf/pfctl/pfctl_osfp.c
===================================================================
--- freebsd/contrib/pf/pfctl/pfctl_osfp.c	(revision c70221cb64185125b4fc97f9c2f15b6b4cf3cf3d)
+++ freebsd/contrib/pf/pfctl/pfctl_osfp.c	(revision 686583cba4f2701185077eab58800741398c3ac2)
@@ -67,7 +67,13 @@
 	int			nm_sublist_num;
 };
+#ifndef __rtems__
 struct name_list classes = LIST_HEAD_INITIALIZER(&classes);
 int class_count;
 int fingerprint_count;
+#else /* __rtems__ */
+static struct name_list classes = LIST_HEAD_INITIALIZER(&classes);
+static int class_count;
+static int fingerprint_count;
+#endif /* __rtems__ */
 
 void			 add_fingerprint(int, int, struct pf_osfp_ioctl *);
Index: freebsd/contrib/pf/pfctl/pfctl_parser.c
===================================================================
--- freebsd/contrib/pf/pfctl/pfctl_parser.c	(revision c70221cb64185125b4fc97f9c2f15b6b4cf3cf3d)
+++ freebsd/contrib/pf/pfctl/pfctl_parser.c	(revision 686583cba4f2701185077eab58800741398c3ac2)
@@ -1165,5 +1165,9 @@
 /* interface lookup routines */
 
+#ifndef __rtems__
 struct node_host	*iftab;
+#else /* __rtems__ */
+static struct node_host	*iftab;
+#endif /* __rtems__ */
 
 void
