diff --git a/build/options.lua b/build/options.lua
index 9676ae8355f116c754f7eeab195508a0d4323de7..03fe35f92a0c44ef7323394834d2e1cc91a06e16 100644
--- a/build/options.lua
+++ b/build/options.lua
@@ -52,4 +52,9 @@ newoption {
 	description = "Doesnt remove jit2 build files",
 }
 
+newoption {
+	trigger	    = "no_rwops_size",
+	description = "Compat for old SDL2 dev verions"
+}
+
 _OPTIONS.lua = _OPTIONS.lua or "jit2"
diff --git a/build/te4core.lua b/build/te4core.lua
index bd72ae2ed9468c24cfcd6efa6978ae94c92a305b..18b240c318f3a20533edc6c39421da8c61ca1bc7 100644
--- a/build/te4core.lua
+++ b/build/te4core.lua
@@ -28,6 +28,8 @@ project "TEngine"
 
 	links { "m" }
 
+	if _OPTIONS.no_rwops_size then defines{"NO_RWOPS_SIZE"} end
+
 	configuration "macosx"
 		files { "../src/mac/SDL*" }
 		includedirs {
@@ -57,7 +59,7 @@ project "TEngine"
 
 
 	configuration "linux"
-		libdirs {"/home/nicolas/local/lib/"}
+		libdirs {"/opt/SDL-2.0/lib/"}
 		links { "dl", "SDL2", "SDL2_ttf", "SDL2_image", "png", "openal", "vorbisfile", "GL", "GLU", "m", "pthread" }
 		defines { [[TENGINE_HOME_PATH='".t-engine"']], 'SELFEXE_LINUX' }
 
@@ -78,6 +80,7 @@ project "physfs"
 	targetname "physfs"
 
 	defines {"PHYSFS_SUPPORTS_ZIP"}
+	if _OPTIONS.no_rwops_size then defines{"NO_RWOPS_SIZE"} end
 
 	files { "../src/physfs/*.c", "../src/physfs/zlib123/*.c", "../src/physfs/archivers/*.c", }
 
diff --git a/premake4.lua b/premake4.lua
index 9e434d630374be37d7efc9265efe1c7c7fca2b0e..5cd2144277dcc122bbc13bc486b5ef63b9b49cf9 100644
--- a/premake4.lua
+++ b/premake4.lua
@@ -18,7 +18,7 @@ solution "TEngine"
 		"src/physfs",
 		"src/physfs/zlib123",
 		"src/bzip2",
-		"/home/nicolas/local/include/SDL2/",
+		"/opt/SDL-2.0/include/SDL2",
 		"/usr/include/GL",
 	}
 	if _OPTIONS.lua == "default" then includedirs{"src/lua"}
diff --git a/src/physfs/physfsrwops.c b/src/physfs/physfsrwops.c
index 2b5844173d5ae3c2cc4b9f69e1ff2540bc1f2523..22d59f19890ac8a68025893076908064a49ad99a 100644
--- a/src/physfs/physfsrwops.c
+++ b/src/physfs/physfsrwops.c
@@ -156,7 +156,9 @@ static SDL_RWops *create_rwops(PHYSFS_File *handle)
             retval->read  = physfsrwops_read;
             retval->write = physfsrwops_write;
             retval->close = physfsrwops_close;
+#ifndef NO_RWOPS_SIZE
             retval->size  = physfsrwops_size;
+#endif
             retval->hidden.unknown.data1 = handle;
         } /* if */
     } /* else */