--- a/src/lib/libast/features/fcntl.c
+++ b/src/lib/libast/features/fcntl.c
@@ -59,7 +59,7 @@
 
 #include "FEATURE/tty"
 
-#if _typ_off64_t
+#if _typ_off64_t && (off64_t != off_t)
 #undef off_t
 #define        off_t   off64_t
 #endif
@@ -342,7 +342,7 @@ main()
 #endif
        printf("\n");
        printf("#include <ast_fs.h>\n");
-       printf("#if _typ_off64_t\n");
+       printf("#if _typ_off64_t && (off64_t != off_t)\n");
        printf("#undef  off_t\n");
        printf("#define off_t           off64_t\n");
        printf("#endif\n");
--- a/src/lib/libast/features/fs
+++ b/src/lib/libast/features/fs
@@ -208,11 +208,11 @@ cat{
        extern int      fstatvfs(int, struct statvfs*);
        extern int      statvfs(const char*, struct statvfs*);
        #endif
-       #if _typ_off64_t
+       #if _typ_off64_t && (off64_t != off_t)
        #undef  off_t
        #define off_t   off64_t
        #endif
-       #if _lib_statvfs64 && !defined(statvfs)
+       #if _lib_statvfs64 && !defined(statvfs) && (statvfs64 != statvfs)
        #define statvfs         statvfs64
        #if !defined(__USE_LARGEFILE64)
        extern int              statvfs64(const char*, struct statvfs64*);
--- a/src/lib/libast/include/ast_std.h
+++ b/src/lib/libast/include/ast_std.h
@@ -93,6 +93,9 @@ struct _sfio_s;
 #ifndef __FILE_defined
 #define __FILE_defined 1
 #endif
+#ifndef __DEFINED_FILE
+#define __DEFINED_FILE 1
+#endif
 #endif
 
 /* locale stuff */
@@ -295,7 +298,7 @@ extern _Ast_info_t  _ast_info;
 #undef ino_t
 #define ino_t          ino64_t
 #endif
-#if _typ_off64_t
+#if _typ_off64_t && (off64_t != off_t)
 #undef off_t
 #define off_t          off64_t
 #endif