diff options
Diffstat (limited to 'meta-oe/recipes-multimedia/alsa/alsa-oss/libio.patch')
| -rw-r--r-- | meta-oe/recipes-multimedia/alsa/alsa-oss/libio.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-oe/recipes-multimedia/alsa/alsa-oss/libio.patch b/meta-oe/recipes-multimedia/alsa/alsa-oss/libio.patch new file mode 100644 index 0000000000..5299945e19 --- /dev/null +++ b/meta-oe/recipes-multimedia/alsa/alsa-oss/libio.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | Index: alsa-oss-1.0.28/alsa/stdioemu.c | ||
| 2 | =================================================================== | ||
| 3 | --- alsa-oss-1.0.28.orig/alsa/stdioemu.c | ||
| 4 | +++ alsa-oss-1.0.28/alsa/stdioemu.c | ||
| 5 | @@ -37,7 +37,9 @@ | ||
| 6 | #endif | ||
| 7 | |||
| 8 | #include <stdio.h> | ||
| 9 | +#ifdef HAVE_LIBIO_H | ||
| 10 | #include <libio.h> | ||
| 11 | +#endif | ||
| 12 | |||
| 13 | struct fd_cookie { | ||
| 14 | int fd; | ||
| 15 | @@ -99,7 +101,11 @@ static FILE *fake_fopen(const char *path | ||
| 16 | |||
| 17 | if (open_mode && fdc->fd > 0) { | ||
| 18 | result = fopencookie (fdc,"w", fns); | ||
| 19 | +#ifdef HAVE_FILENO | ||
| 20 | result->_fileno = fdc->fd; /* ugly patchy slimy kludgy hack */ | ||
| 21 | +#else | ||
| 22 | + result->__filedes = fdc->fd; | ||
| 23 | +#endif | ||
| 24 | } | ||
| 25 | return result; | ||
| 26 | } | ||
| 27 | Index: alsa-oss-1.0.28/configure.ac | ||
| 28 | =================================================================== | ||
| 29 | --- alsa-oss-1.0.28.orig/configure.ac | ||
| 30 | +++ alsa-oss-1.0.28/configure.ac | ||
| 31 | @@ -35,6 +35,12 @@ if test "$with_aoss" = "yes"; then | ||
| 32 | LIBS="$OLD_LIBS" | ||
| 33 | fi | ||
| 34 | |||
| 35 | +AC_CHECK_HEADERS_ONCE([libio.h]) | ||
| 36 | + | ||
| 37 | +AC_CHECK_MEMBER([struct _IO_FILE._fileno], | ||
| 38 | + [AC_DEFINE([HAVE_FILENO], [1],[Define if _fileno exists.])], | ||
| 39 | + [],[]) | ||
| 40 | + | ||
| 41 | AC_OUTPUT(Makefile alsa/Makefile alsa/aoss alsa/aoss.old \ | ||
| 42 | oss-redir/Makefile test/Makefile \ | ||
| 43 | alsa/testaoss test/testaoss) | ||
