mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-14 00:39:18 +08:00
IFCONFIG(8): Fix write to const string
This commit is contained in:
parent
c6261f9787
commit
60e753777a
@ -149,6 +149,12 @@ in_getaddr(const char *s, int which)
|
||||
struct hostent *hp;
|
||||
struct netent *np;
|
||||
|
||||
#ifdef __rtems__
|
||||
/* Memory is automatically freed */
|
||||
s = strdup(s);
|
||||
if (s == NULL)
|
||||
errx(1, "no memory");
|
||||
#endif /* __rtems__ */
|
||||
sin->sin_len = sizeof(*sin);
|
||||
sin->sin_family = AF_INET;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user