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 | 49 |
1 files changed, 49 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..0c95068a36 --- /dev/null +++ b/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch | |||
@@ -0,0 +1,49 @@ | |||
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 | Upstream-Status: Pending | ||
5 | |||
6 | --- console-tools-0.3.2/lib/cfont/fontstruct.c.ark 2005-05-22 19:12:38.000000000 +0000 | ||
7 | +++ console-tools-0.3.2/lib/cfont/fontstruct.c 2005-05-22 19:13:23.000000000 +0000 | ||
8 | @@ -50,8 +50,7 @@ | ||
9 | * get filesize | ||
10 | */ | ||
11 | |||
12 | - /* FIXME: should not use _fileno ! */ | ||
13 | - if (fstat(fontfile->_fileno, &stbuf) == -1) | ||
14 | + if (fstat(fileno(fontfile), &stbuf) == -1) | ||
15 | goto rsf_return_error; | ||
16 | |||
17 | if (S_ISREG(stbuf.st_mode)) | ||
18 | @@ -211,8 +210,7 @@ | ||
19 | * get filesize | ||
20 | */ | ||
21 | |||
22 | - /* FIXME: should not use _fileno ! */ | ||
23 | - if (fstat(fontfile->_fileno, &stbuf) == -1) | ||
24 | + if (fstat(fileno(fontfile), &stbuf) == -1) | ||
25 | goto rfg_return_error; | ||
26 | |||
27 | if (S_ISREG(stbuf.st_mode)) | ||
28 | --- console-tools-0.3.2/lib/console/acm.c.ark 2005-05-22 19:17:15.000000000 +0000 | ||
29 | +++ console-tools-0.3.2/lib/console/acm.c 2005-05-22 19:17:23.000000000 +0000 | ||
30 | @@ -30,7 +30,7 @@ | ||
31 | lct_boolean parse_failed = False; | ||
32 | lct_boolean is_unicode; | ||
33 | |||
34 | - if (fstat(fp->_fileno, &stbuf)) | ||
35 | + if (fstat(fileno(fp), &stbuf)) | ||
36 | perror(_("Cannot stat ACM file")), exit(1); | ||
37 | |||
38 | /* first try a wg15-charmap (glibc) file format */ | ||
39 | --- console-tools-0.3.2/include/lct/local.h.ark 2005-05-22 19:08:54.000000000 +0000 | ||
40 | +++ console-tools-0.3.2/include/lct/local.h 2005-05-22 19:09:12.000000000 +0000 | ||
41 | @@ -8,7 +8,7 @@ | ||
42 | #include <locale.h> | ||
43 | |||
44 | |||
45 | -#ifdef HAVE_LOCALE_H | ||
46 | +#if defined(HAVE_LOCALE_H) && defined(HAVE_LIBINTL_H) | ||
47 | # include <libintl.h> | ||
48 | # define _(String) gettext (String) | ||
49 | # ifdef gettext_noop | ||