diff options
Diffstat (limited to 'freebsd/sbin')
-rw-r--r-- | freebsd/sbin/pfctl/pfctl_parser.c | 10 | ||||
-rw-r--r-- | freebsd/sbin/pfctl/rtems-bsd-pfctl-namespace.h | 1 | ||||
-rw-r--r-- | freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_altq-data.h | 2 | ||||
-rw-r--r-- | freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_parser-data.h | 1 | ||||
-rw-r--r-- | freebsd/sbin/ping6/ping6.c | 11 |
5 files changed, 23 insertions, 2 deletions
diff --git a/freebsd/sbin/pfctl/pfctl_parser.c b/freebsd/sbin/pfctl/pfctl_parser.c index 56f548ba..8a93b39e 100644 --- a/freebsd/sbin/pfctl/pfctl_parser.c +++ b/freebsd/sbin/pfctl/pfctl_parser.c @@ -1351,10 +1351,17 @@ get_socket_domain(void) return (sdom); } +#ifdef __rtems__ +static int pfctl_s = -1; +#endif /* __rtems__ */ int get_query_socket(void) { +#ifndef __rtems__ static int s = -1; +#else /* __rtems__ */ +#define s pfctl_s +#endif /* __rtems__ */ if (s == -1) { if ((s = socket(get_socket_domain(), SOCK_DGRAM, 0)) == -1) @@ -1362,6 +1369,9 @@ get_query_socket(void) } return (s); +#ifdef __rtems__ +#undef s +#endif /* __rtems__ */ } /* diff --git a/freebsd/sbin/pfctl/rtems-bsd-pfctl-namespace.h b/freebsd/sbin/pfctl/rtems-bsd-pfctl-namespace.h index 3d805ea1..c43866bb 100644 --- a/freebsd/sbin/pfctl/rtems-bsd-pfctl-namespace.h +++ b/freebsd/sbin/pfctl/rtems-bsd-pfctl-namespace.h @@ -35,6 +35,7 @@ #define parseport _bsd_pfctl_parseport #define pfctl_cmdline_symset _bsd_pfctl_pfctl_cmdline_symset #define pfctl_load_anchors _bsd_pfctl_pfctl_load_anchors +#define pfctl_s _bsd_pfctl_s #define pfctlychar _bsd_pfctl_pfctlychar #define pfctlydebug _bsd_pfctl_pfctlydebug #define pfctlyerrflag _bsd_pfctl_pfctlyerrflag diff --git a/freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_altq-data.h b/freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_altq-data.h index 4c39bea9..59b3541d 100644 --- a/freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_altq-data.h +++ b/freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_altq-data.h @@ -4,8 +4,6 @@ /* pfctl_altq.c */ RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static char r2sbuf[][16]); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static int idx); -RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static struct gen_sc lssc); -RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static struct gen_sc rtsc); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static struct hsearch_data if_map); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static struct hsearch_data qid_map); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static struct hsearch_data queue_map); diff --git a/freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_parser-data.h b/freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_parser-data.h index f9a7f49f..ac6655cc 100644 --- a/freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_parser-data.h +++ b/freebsd/sbin/pfctl/rtems-bsd-pfctl-pfctl_parser-data.h @@ -4,3 +4,4 @@ /* pfctl_parser.c */ RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static struct hsearch_data isgroup_map); RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static struct node_host *iftab); +RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, static int pfctl_s); diff --git a/freebsd/sbin/ping6/ping6.c b/freebsd/sbin/ping6/ping6.c index db3ab05a..96bd60e3 100644 --- a/freebsd/sbin/ping6/ping6.c +++ b/freebsd/sbin/ping6/ping6.c @@ -115,6 +115,7 @@ __FBSDID("$FreeBSD$"); #include <getopt.h> #include <machine/rtems-bsd-program.h> #include <machine/rtems-bsd-commands.h> +#include <rtems/libio_.h> #endif /* __rtems__ */ #include <sys/param.h> #include <sys/capsicum.h> @@ -1198,7 +1199,13 @@ main(int argc, char *argv[]) struct timespec now, timeout; struct msghdr m; struct iovec iov[2]; +#ifndef __rtems__ fd_set rfds; +#else /* __rtems__ */ + fd_set big_enough_rfds[howmany(rtems_libio_number_iops, + sizeof(fd_set) * 8)]; +#define rfds (*(fd_set *)(&big_enough_rfds[0])) +#endif /* __rtems__ */ int n; /* signal handling */ @@ -1211,7 +1218,11 @@ main(int argc, char *argv[]) continue; } #endif +#ifndef __rtems__ FD_ZERO(&rfds); +#else /* __rtems__ */ + memset(big_enough_rfds, 0, sizeof(big_enough_rfds)); +#endif /* __rtems__ */ FD_SET(srecv, &rfds); clock_gettime(CLOCK_MONOTONIC, &now); timespecadd(&last, &intvl, &timeout); |