/
patch-unix__sys_unix.c
48 lines (42 loc) · 1.27 KB
/
patch-unix__sys_unix.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--- unix/sys_unix.c.orig 2006-01-11 13:06:28 UTC
+++ unix/sys_unix.c
@@ -36,10 +36,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
#include <sys/mman.h>
#include <errno.h>
-#ifdef __linux__
-#include <mntent.h>
-#endif
-
#include <dlfcn.h>
#include "../qcommon/qcommon.h"
@@ -220,15 +216,8 @@ void *Sys_GetGameAPI (void *parms)
void *(*GetGameAPI) (void *);
char name[MAX_OSPATH];
- char curpath[MAX_OSPATH];
char *path;
-#ifdef __i386__
- const char *gamename = "gamei386.so";
-#elif defined __alpha__
- const char *gamename = "gameaxp.so";
-#else
-#error Unknown arch
-#endif
+ const char *gamename = "game.so";
setreuid(getuid(), getuid());
setegid(getgid());
@@ -236,8 +225,6 @@ void *Sys_GetGameAPI (void *parms)
if (game_library)
Com_Error (ERR_FATAL, "Sys_GetGameAPI without Sys_UnloadingGame");
- getcwd(curpath, sizeof(curpath));
-
Com_Printf("------- Loading %s -------\n", gamename);
// now run through the search paths
@@ -247,7 +234,7 @@ void *Sys_GetGameAPI (void *parms)
path = FS_NextPath (path);
if (!path)
return NULL; // couldn't find one anywhere
- sprintf (name, "%s/%s/%s", curpath, path, gamename);
+ sprintf (name, "%s/%s", path, gamename);
game_library = dlopen (name, RTLD_LAZY );
if (game_library)
{