]> git.pld-linux.org Git - packages/avifile.git/blame - avifile-home_etc.patch
- workaround for struct name change in Linux 2.6 headers
[packages/avifile.git] / avifile-home_etc.patch
CommitLineData
defb69a4 1diff -Nru avifile0.7-0.7.32/lib/common/Registry.cpp avifile0.7-0.7.32.new/lib/common/Registry.cpp
2--- avifile0.7-0.7.32/lib/common/Registry.cpp Fri Oct 4 09:07:33 2002
3+++ avifile0.7-0.7.32.new/lib/common/Registry.cpp Sun Mar 23 13:59:08 2003
4@@ -33,15 +33,22 @@
5 if (!config)
6 {
7 char* home;
8- home = getenv("HOME");
9- if (home == 0)
10+ int config_dir_used = 0;
11+ home = getenv("CONFIG_DIR");
12+ if (home) config_dir_used = 1;
13+ else
14 {
15- struct passwd* pwent = getpwuid(getuid());
16- home = pwent->pw_dir;
17+ home = getenv("HOME");
18+ if (home == 0)
19+ {
20+ struct passwd* pwent = getpwuid(getuid());
21+ home = pwent->pw_dir;
22+ }
23 }
24 avm::string s(home);
25 if (!sConfigDir)
26- s += "/.avm";
27+ if (config_dir_used) s+= "/avm";
28+ else s += "/.avm";
29 else
30 {
31 s += "/";
This page took 0.071339 seconds and 4 git commands to generate.