diff options
Diffstat (limited to 'meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch')
-rw-r--r-- | meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch new file mode 100644 index 0000000000..c73d8a3d9e --- /dev/null +++ b/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | Fixing the locale issues isn't enough, console-tools also does a couple of | ||
2 | other pretty stupid things (like FILE *f; f->_fileno instead of fileno(f)), | ||
3 | |||
4 | --- console-tools-0.3.2/lib/cfont/fontstruct.c.ark 2005-05-22 19:12:38.000000000 +0000 | ||
5 | +++ console-tools-0.3.2/lib/cfont/fontstruct.c 2005-05-22 19:13:23.000000000 +0000 | ||
6 | @@ -50,8 +50,7 @@ | ||
7 | * get filesize | ||
8 | */ | ||
9 | |||
10 | - /* FIXME: should not use _fileno ! */ | ||
11 | - if (fstat(fontfile->_fileno, &stbuf) == -1) | ||
12 | + if (fstat(fileno(fontfile), &stbuf) == -1) | ||
13 | goto rsf_return_error; | ||
14 | |||
15 | if (S_ISREG(stbuf.st_mode)) | ||
16 | @@ -211,8 +210,7 @@ | ||
17 | * get filesize | ||
18 | */ | ||
19 | |||
20 | - /* FIXME: should not use _fileno ! */ | ||
21 | - if (fstat(fontfile->_fileno, &stbuf) == -1) | ||
22 | + if (fstat(fileno(fontfile), &stbuf) == -1) | ||
23 | goto rfg_return_error; | ||
24 | |||
25 | if (S_ISREG(stbuf.st_mode)) | ||
26 | --- console-tools-0.3.2/lib/console/acm.c.ark 2005-05-22 19:17:15.000000000 +0000 | ||
27 | +++ console-tools-0.3.2/lib/console/acm.c 2005-05-22 19:17:23.000000000 +0000 | ||
28 | @@ -30,7 +30,7 @@ | ||
29 | lct_boolean parse_failed = False; | ||
30 | lct_boolean is_unicode; | ||
31 | |||
32 | - if (fstat(fp->_fileno, &stbuf)) | ||
33 | + if (fstat(fileno(fp), &stbuf)) | ||
34 | perror(_("Cannot stat ACM file")), exit(1); | ||
35 | |||
36 | /* first try a wg15-charmap (glibc) file format */ | ||
37 | --- console-tools-0.3.2/include/lct/local.h.ark 2005-05-22 19:08:54.000000000 +0000 | ||
38 | +++ console-tools-0.3.2/include/lct/local.h 2005-05-22 19:09:12.000000000 +0000 | ||
39 | @@ -8,7 +8,7 @@ | ||
40 | #include <locale.h> | ||
41 | |||
42 | |||
43 | -#ifdef HAVE_LOCALE_H | ||
44 | +#if defined(HAVE_LOCALE_H) && defined(HAVE_LIBINTL_H) | ||
45 | # include <libintl.h> | ||
46 | # define _(String) gettext (String) | ||
47 | # ifdef gettext_noop | ||