diff --git a/src/physfs/physfsrwops.c b/src/physfs/physfsrwops.c
index d2bdec5daf31ba3ed4273a2cd66c37476f321c78..fbdc8e9c07756f6cf5402e9fc10637371d76cba1 100644
--- a/src/physfs/physfsrwops.c
+++ b/src/physfs/physfsrwops.c
@@ -121,7 +121,6 @@ static int physfsrwops_write(SDL_RWops *rw, const void *ptr, int size, int num)
     return((int) rc);
 } /* physfsrwops_write */
 
-
 static int physfsrwops_close(SDL_RWops *rw)
 {
     PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
@@ -135,6 +134,12 @@ static int physfsrwops_close(SDL_RWops *rw)
     return(0);
 } /* physfsrwops_close */
 
+static int physfsrwops_size(SDL_RWops *rw)
+{
+    PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
+    return PHYSFS_fileLength(handle);
+} /* physfsrwops_size */
+
 
 static SDL_RWops *create_rwops(PHYSFS_File *handle)
 {
@@ -151,6 +156,7 @@ static SDL_RWops *create_rwops(PHYSFS_File *handle)
             retval->read  = physfsrwops_read;
             retval->write = physfsrwops_write;
             retval->close = physfsrwops_close;
+            retval->size  = physfsrwops_size;
             retval->hidden.unknown.data1 = handle;
         } /* if */
     } /* else */