parser: RETURN [<native call> AS] SET_FUNC
[m6w6/ext-psi] / psi.d / string.psi
index 5ea4db4932c223abf33ee1c22929d9ec743edc02..824b7e336126f3196ac039146e61c612904cf221 100644 (file)
@@ -1,5 +1,6 @@
-extern char *strerror(int errno);
+#include <string.h>
+
 function psi\strerror(int $errno) : string {
-       let errno = intval($errno);
-       return to_string(strerror);
+       let err = intval($errno);
+       return strerror(err) as to_string(strerror);
 }