Make mklocale work again, now that fwrite()'s return codes are different.

Submitted by:	Navdeep Parhar <nparhar gmail com>
Approved by:	re (kib)
This commit is contained in:
Ed Schouten 2009-07-14 09:19:33 +00:00
parent 3d22427cff
commit 523a386d23

View File

@ -730,8 +730,8 @@ dump_tables()
/*
* PART 6: And finally the variable data
*/
if (fwrite(variable,
ntohl(new_locale.variable_len), 1, fp) != 1) {
if (new_locale.variable_len != 0 &&
fwrite(variable, ntohl(new_locale.variable_len), 1, fp) != 1) {
perror(locale_file);
exit(1);
}