stdio vararg decls
[m6w6/ext-psi] / psi.d / stat.psi
index 82d624976162301b1687dd8d90c5183209aa4232..dc89119624d37cc474ee60b3549d440ee74f1472 100644 (file)
@@ -1,6 +1,7 @@
+// extern int stat(char *path, struct stat *buf);
 function psi\stat(string $path, array &$buf = NULL) : int {
        let path = strval($path);
-       let buf = calloc(1, struct stat);
+       let buf = calloc(1, psi\SIZEOF_STRUCT_STAT);
        return to_int(stat);
        set $buf = to_array(*buf,
                to_int(st_dev),