update 7-Zip to 4.62
[sugaredwine.git] / patches / 0022-libwine-hard-code-the-username-because-Rainbow-like.patch
blob33f1189262129c81800d676884cb8fb98c285d1b
1 From ca33dcdaccac998a3d71ef6245c801dc35dfc20f Mon Sep 17 00:00:00 2001
2 From: Vincent Povirk <vincent@codeweavers.com>
3 Date: Thu, 9 Oct 2008 11:37:20 -0500
4 Subject: [PATCH] libwine: hard-code the username because Rainbow likes to change it
6 ---
7 libs/wine/config.c | 8 +++++++-
8 1 files changed, 7 insertions(+), 1 deletions(-)
10 diff --git a/libs/wine/config.c b/libs/wine/config.c
11 index dbfe930..8eaf164 100644
12 --- a/libs/wine/config.c
13 +++ b/libs/wine/config.c
14 @@ -45,9 +45,11 @@ static char *datadir;
15 static char *config_dir;
16 static char *server_dir;
17 static char *build_dir;
18 -static char *user_name;
19 static char *argv0_name;
21 +/* use a constant username because Rainbow likes to change it */
22 +static const char user_name[] = "sugaruser";
24 #ifdef __GNUC__
25 static void fatal_error( const char *err, ... ) __attribute__((noreturn,format(printf,1,2)));
26 static void fatal_perror( const char *err, ... ) __attribute__((noreturn,format(printf,1,2)));
27 @@ -176,9 +178,12 @@ static void init_paths(void)
28 struct stat st;
30 const char *home = getenv( "HOME" );
31 +#if 0 /* disabled because of rainbow */
32 const char *user = NULL;
33 +#endif
34 const char *prefix = getenv( "WINEPREFIX" );
36 +#if 0 /* disabled because of rainbow */
37 #ifdef HAVE_GETPWUID
38 char uid_str[32];
39 struct passwd *pwd = getpwuid( getuid() );
40 @@ -198,6 +203,7 @@ static void init_paths(void)
41 fatal_error( "cannot determine your user name, set the USER environment variable\n" );
42 #endif /* HAVE_GETPWUID */
43 user_name = xstrdup( user );
44 +#endif
46 /* build config_dir */
48 --
49 1.5.6.5