mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-17 04:26:23 +08:00
Resolve more conflicts
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
#ifdef __rtems__
|
||||||
|
#define __need_getopt_newlib
|
||||||
|
#include <getopt.h>
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1983, 1989, 1991, 1993
|
* Copyright (c) 1983, 1989, 1991, 1993
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
@@ -142,11 +146,19 @@ main(argc, argv)
|
|||||||
char **argv;
|
char **argv;
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
|
#ifdef __rtems__
|
||||||
|
struct getopt_data getopt_reent;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
usage((char *)NULL);
|
usage((char *)NULL);
|
||||||
|
|
||||||
|
#ifdef __rtems__
|
||||||
|
memset(&getopt_reent, 0, sizeof(getopt_data));
|
||||||
|
while ((ch = getopt_r(argc, argv, "nqdtv", &getopt_reent)) != -1)
|
||||||
|
#else
|
||||||
while ((ch = getopt(argc, argv, "nqdtv")) != -1)
|
while ((ch = getopt(argc, argv, "nqdtv")) != -1)
|
||||||
|
#endif
|
||||||
switch(ch) {
|
switch(ch) {
|
||||||
case 'n':
|
case 'n':
|
||||||
nflag = 1;
|
nflag = 1;
|
||||||
@@ -1683,3 +1695,16 @@ atalk_ntoa(struct at_addr at)
|
|||||||
(void) snprintf(buf, sizeof(buf), "%u.%u", ntohs(at.s_net), at.s_node);
|
(void) snprintf(buf, sizeof(buf), "%u.%u", ntohs(at.s_net), at.s_node);
|
||||||
return(buf);
|
return(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __rtems__
|
||||||
|
#include <rtems/shell.h>
|
||||||
|
|
||||||
|
rtems_shell_cmd_t rtems_shell_ROUTE_Command = {
|
||||||
|
"route", /* name */
|
||||||
|
"route [args]", /* usage */
|
||||||
|
"net", /* topic */
|
||||||
|
main_route, /* command */
|
||||||
|
NULL, /* alias */
|
||||||
|
NULL /* next */
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user