From: Austin English Subject: libs/wine: give user an error message if WINEARCH is not win32/win64 (try 2) (resend) Message-Id: Date: Tue, 15 Nov 2016 23:15:04 -0600 Fixes https://bugs.winehq.org/show_bug.cgi?id=41378 See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838474 Last try dropped off without reply. I'd really like to see this in for 2.0. -- -Austin GPG: 14FB D7EA A041 937B From a951d986bdb72d2836868af797fd25df58fb7d4a Mon Sep 17 00:00:00 2001 From: Austin English Date: Mon, 10 Oct 2016 20:43:36 -0500 Subject: [PATCH] libs/wine: give user an error message if WINEARCH is not win32/win64 Signed-off-by: Austin English --- libs/wine/config.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/wine/config.c b/libs/wine/config.c index 3b5dd68..8820af0 100644 --- a/libs/wine/config.c +++ b/libs/wine/config.c @@ -260,6 +260,7 @@ static void init_paths(void) { struct stat st; + const char *arch = getenv( "WINEARCH" ); const char *home = getenv( "HOME" ); const char *user = NULL; const char *prefix = getenv( "WINEPREFIX" ); @@ -284,6 +285,12 @@ static void init_paths(void) #endif /* HAVE_GETPWUID */ user_name = xstrdup( user ); + /* ensure WINEARCH is valid */ + if (arch && strcmp( arch, "win32" ) && strcmp( arch, "win64" )) + { + fatal_error( "WINEARCH set to unknown value %s. Must be win32 or win64.\n", arch ); + } + /* build config_dir */ if (prefix) -- 2.7.3