lib: fix file_nit.c for 64bits
authorJean Privat <jean@pryen.org>
Wed, 19 Aug 2009 19:08:15 +0000 (15:08 -0400)
committerJean Privat <jean@pryen.org>
Wed, 19 Aug 2009 21:23:17 +0000 (17:23 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/standard/file_nit.c

index 50465f3..2ce41d3 100644 (file)
@@ -29,20 +29,20 @@ int string_NativeString_NativeString_file_exists_0(char *f){
        return hdl != NULL;
 }
 
-static int to_nit_file_stat(struct stat* st){
+void *to_nit_file_stat(struct stat* st){
        struct stat* stat_element;
        stat_element = malloc(sizeof(struct stat));
-       return (int)memcpy(stat_element, st, sizeof(struct stat));
+       return memcpy(stat_element, st, sizeof(struct stat));
 }
 
-int string_NativeString_NativeString_file_stat_0(char *f){
+void *string_NativeString_NativeString_file_stat_0(char *f){
        struct stat buff;
        if(stat(f, &buff) != -1)
                return to_nit_file_stat(&buff);
        return 0;
 }
 
-int file_NativeFile_NativeFile_file_stat_0(FILE *f){
+void *file_NativeFile_NativeFile_file_stat_0(FILE *f){
        struct stat buff;
        if(fstat(fileno(f), &buff) != -1)
                return to_nit_file_stat(&buff);