IFCONFIG(8): Fix write to const string

This commit is contained in:
Sebastian Huber 2019-05-13 09:19:44 +02:00
parent 647dd08ae2
commit 3549a127ec

View File

@ -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;