diff options
Diffstat (limited to 'games/meritous/files/patch-src-levelblit.c')
-rw-r--r-- | games/meritous/files/patch-src-levelblit.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/games/meritous/files/patch-src-levelblit.c b/games/meritous/files/patch-src-levelblit.c new file mode 100644 index 000000000000..631283b75505 --- /dev/null +++ b/games/meritous/files/patch-src-levelblit.c @@ -0,0 +1,30 @@ +--- src/levelblit.c.orig 2008-01-15 05:54:41.000000000 +0300 ++++ src/levelblit.c 2008-11-24 02:16:34.000000000 +0300 +@@ -27,7 +27,11 @@ + #include <SDL.h>
+ #include <SDL_image.h>
+ #include <assert.h>
+-
++ ++#include <unistd.h> ++#include <err.h> ++#include <sys/stat.h> ++ + #include "mapgen.h"
+ #include "demon.h"
+ #include "gamemap.h"
+@@ -378,6 +382,14 @@ +
+ int main(int argc, char **argv)
+ {
++ { ++ if (chdir(getenv("HOME")) != 0) ++ err(1, "cannot cd to $HOME"); ++ if (mkdir(".meritous", 0755) != 0 && errno != EEXIST) ++ err(1, "cannot mkdir $HOME/.meritous"); ++ if (chdir(".meritous") != 0) ++ err(1, "cannot cd to $HOME/.meritous"); ++ } + int on_title = 1;
+ int executable_running = 1;
+ SDL_Surface *title, *title_pr, *asceai;
|