Commit eec5e98e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Replace strndup(), OS/X doesn't have it.

parent 1d7dd2ab
......@@ -201,8 +201,10 @@ vsc_f_arg(struct VSM_data *vd, const char *opt)
if (*q == '\\')
q++;
if (i < 3) {
parts[i] = strndup(p, q - p);
parts[i] = malloc(1 + q - p);
AN(parts[i]);
memcpy(parts[i], p, q - p);
parts[i][q - p] = '\0';
p = r = parts[i];
/* Unescape */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment