diff options
author | 2009-10-11 07:30:29 +0000 | |
---|---|---|
committer | 2009-10-11 07:30:29 +0000 | |
commit | 285835db9ce9c9c5563420cff9d47c6bb97345cc (patch) | |
tree | 211a83291e8faa2850ae82ab4173aee1f358dbc5 /sys-libs/ncurses/files | |
parent | version bump (diff) | |
download | gentoo-2-285835db9ce9c9c5563420cff9d47c6bb97345cc.tar.gz gentoo-2-285835db9ce9c9c5563420cff9d47c6bb97345cc.tar.bz2 gentoo-2-285835db9ce9c9c5563420cff9d47c6bb97345cc.zip |
Add fix from upstream for db issues #245370 by Graham Murray. Fix cross-compiling hang with tic and older ncurses #249363.
(Portage version: 2.2_rc42/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs/ncurses/files')
-rw-r--r-- | sys-libs/ncurses/files/ncurses-5.7-hashdb-open.patch | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/sys-libs/ncurses/files/ncurses-5.7-hashdb-open.patch b/sys-libs/ncurses/files/ncurses-5.7-hashdb-open.patch new file mode 100644 index 000000000000..d2575fd45cce --- /dev/null +++ b/sys-libs/ncurses/files/ncurses-5.7-hashdb-open.patch @@ -0,0 +1,88 @@ +http://bugs.gentoo.org/245370 + +ripped from ncurses-5.7-20081213.patch + +20081213 + + add check for failure to open hashed-database needed for db4.6 + (GenToo #245370). + +--- ncurses-5.7-20081206+/ncurses/tinfo/hashed_db.c 2006-08-19 19:48:38.000000000 +0000 ++++ ncurses-5.7-20081213/ncurses/tinfo/hashed_db.c 2008-12-13 20:59:02.000000000 +0000 +@@ -49,27 +49,30 @@ + _nc_db_open(const char *path, bool modify) + { + DB *result = 0; ++ int code; + + #if HASHED_DB_API >= 4 + db_create(&result, NULL, 0); +- result->open(result, +- NULL, +- path, +- NULL, +- DB_HASH, +- modify ? DB_CREATE : DB_RDONLY, +- 0644); ++ if ((code = result->open(result, ++ NULL, ++ path, ++ NULL, ++ DB_HASH, ++ modify ? DB_CREATE : DB_RDONLY, ++ 0644)) != 0) { ++ result = 0; ++ } + #elif HASHED_DB_API >= 3 + db_create(&result, NULL, 0); +- result->open(result, +- path, +- NULL, +- DB_HASH, +- modify ? DB_CREATE : DB_RDONLY, +- 0644); ++ if ((code = result->open(result, ++ path, ++ NULL, ++ DB_HASH, ++ modify ? DB_CREATE : DB_RDONLY, ++ 0644)) != 0) { ++ result = 0; ++ } + #elif HASHED_DB_API >= 2 +- int code; +- + if ((code = db_open(path, + DB_HASH, + modify ? DB_CREATE : DB_RDONLY, +@@ -77,21 +80,22 @@ + (DB_ENV *) 0, + (DB_INFO *) 0, + &result)) != 0) { +- T(("cannot open %s: %s", path, strerror(code))); + result = 0; +- } else { +- T(("opened %s", path)); + } + #else +- result = dbopen(path, +- modify ? (O_CREAT | O_RDWR) : O_RDONLY, +- 0644, +- DB_HASH, +- NULL); ++ if ((result = dbopen(path, ++ modify ? (O_CREAT | O_RDWR) : O_RDONLY, ++ 0644, ++ DB_HASH, ++ NULL)) == 0) { ++ code = errno; ++ } ++#endif + if (result != 0) { + T(("opened %s", path)); ++ } else { ++ T(("cannot open %s: %s", path, strerror(code))); + } +-#endif + return result; + } + |