OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../w3m/w3m-0.5.3-glibc214.patch
  5. # Copyright (C) 2012 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Fix build with glibc-2.14
  17. original patch from gentoo linux
  18. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/w3m/files/w3m-0.5.3-glibc214.patch?revision=1.1
  19. --- a/istream.c 2011-01-04 18:22:22.000000000 +0900
  20. +++ b/istream.c 2011-06-24 08:15:23.522990618 +0900
  21. @@ -22,8 +22,8 @@
  22. static void basic_close(int *handle);
  23. static int basic_read(int *handle, char *buf, int len);
  24. -static void file_close(struct file_handle *handle);
  25. -static int file_read(struct file_handle *handle, char *buf, int len);
  26. +static void file_close(struct afile_handle *handle);
  27. +static int file_read(struct afile_handle *handle, char *buf, int len);
  28. static int str_read(Str handle, char *buf, int len);
  29. @@ -114,7 +114,7 @@
  30. stream = New(union input_stream);
  31. init_base_stream(&stream->base, STREAM_BUF_SIZE);
  32. stream->file.type = IST_FILE;
  33. - stream->file.handle = New(struct file_handle);
  34. + stream->file.handle = New(struct afile_handle);
  35. stream->file.handle->f = f;
  36. if (closep)
  37. stream->file.handle->close = closep;
  38. @@ -658,13 +658,13 @@
  39. }
  40. static void
  41. -file_close(struct file_handle *handle)
  42. +file_close(struct afile_handle *handle)
  43. {
  44. handle->close(handle->f);
  45. }
  46. static int
  47. -file_read(struct file_handle *handle, char *buf, int len)
  48. +file_read(struct afile_handle *handle, char *buf, int len)
  49. {
  50. return fread(buf, 1, len, handle->f);
  51. }
  52. --- a/istream.h 2003-10-21 01:41:56.000000000 +0900
  53. +++ b/istream.h 2011-06-24 08:15:54.392991144 +0900
  54. @@ -20,7 +20,7 @@
  55. typedef struct stream_buffer *StreamBuffer;
  56. -struct file_handle {
  57. +struct afile_handle {
  58. FILE *f;
  59. void (*close) ();
  60. };
  61. @@ -53,7 +53,7 @@
  62. struct file_stream {
  63. struct stream_buffer stream;
  64. - struct file_handle *handle;
  65. + struct afile_handle *handle;
  66. char type;
  67. char iseos;
  68. int (*read) ();