mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 00:38:39 +08:00
IFCONFIG(8): Fix write to const string
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user