diff options
Diffstat (limited to 'net-im/bitlbee/files/bitlbee-gentoohack.patch')
-rw-r--r-- | net-im/bitlbee/files/bitlbee-gentoohack.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/net-im/bitlbee/files/bitlbee-gentoohack.patch b/net-im/bitlbee/files/bitlbee-gentoohack.patch new file mode 100644 index 000000000000..b39a64922518 --- /dev/null +++ b/net-im/bitlbee/files/bitlbee-gentoohack.patch @@ -0,0 +1,32 @@ +diff -Naur bitlbee-0.91/bitlbee.c bitlbee-0.91-gentoohack/bitlbee.c +--- bitlbee-0.91/bitlbee.c 2004-11-21 15:52:28.000000000 +0100 ++++ bitlbee-0.91-gentoohack/bitlbee.c 2004-12-21 17:15:15.000000000 +0100 +@@ -285,6 +285,7 @@ + account_t *a; + FILE *fp; + char *hash; ++ int retval; + + /*\ + * [SH] Nothing should be saved if no password is set, because the +@@ -344,11 +345,16 @@ + g_snprintf( path, 511, "%s%s%s", global.conf->configdir, irc->nick, ".accounts~" ); + fp = fopen( path, "w" ); + if( !fp ) return( 0 ); +- if( fprintf( fp, "%s", hash ) != strlen( hash ) ) ++ retval = fprintf( fp, "%s", hash ); ++ if( retval != strlen( hash ) ) + { +- irc_usermsg( irc, "fprintf() wrote too little. Disk full?" ); +- fclose( fp ); +- return( 0 ); ++ if( retval == 1) { ++ irc_usermsg( irc, "Enabling writing hack for gentoo. This is dangerous and may corrupt your files."); ++ } else { ++ irc_usermsg( irc, "fprintf() wrote too little. Disk full?" ); ++ fclose( fp ); ++ return( 0 ); ++ } + } + g_free( hash ); + |