Browse code

Fix macOS build.

Andrew Alderwick authored on 02/01/2023 15:23:28
Showing 1 changed files
... ...
@@ -132,7 +132,9 @@ retry_realpath(const char *file_name)
132 132
 		else
133 133
 			return NULL;
134 134
 	}
135
-	return strdup(r);
135
+	x = malloc(strlen(r) + 1);
136
+	strcpy(x, r);
137
+	return x;
136 138
 }
137 139
 
138 140
 static void