eglibc-cross.patch 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h eglibc-2.11.1/libc/sunrpc/rpc/types.h
  2. --- eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h 2010-02-24 08:09:59.000000000 +0100
  3. +++ eglibc-2.11.1/libc/sunrpc/rpc/types.h 2010-03-22 18:30:14.944408497 +0100
  4. @@ -68,6 +68,7 @@
  5. #include <sys/types.h>
  6. #endif
  7. +#if !defined(_CROSS_RPCGEN_)
  8. #ifndef __u_char_defined
  9. typedef __u_char u_char;
  10. typedef __u_short u_short;
  11. @@ -83,6 +84,7 @@
  12. typedef __caddr_t caddr_t;
  13. # define __daddr_t_defined
  14. #endif
  15. +#endif
  16. #include <sys/time.h>
  17. #include <sys/param.h>
  18. diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c eglibc-2.11.1/libc/sunrpc/rpc_clntout.c
  19. --- eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c 2010-02-24 08:10:01.000000000 +0100
  20. +++ eglibc-2.11.1/libc/sunrpc/rpc_clntout.c 2010-03-22 18:30:38.973160151 +0100
  21. @@ -31,7 +31,7 @@
  22. */
  23. #include <stdio.h>
  24. #include <string.h>
  25. -#include <rpc/types.h>
  26. +#include "rpc/types.h"
  27. #include "rpc_parse.h"
  28. #include "rpc_util.h"
  29. #include "proto.h"
  30. diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c eglibc-2.11.1/libc/sunrpc/rpc_scan.c
  31. --- eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c 2010-02-24 08:10:00.000000000 +0100
  32. +++ eglibc-2.11.1/libc/sunrpc/rpc_scan.c 2010-03-22 18:31:16.146907097 +0100
  33. @@ -36,7 +36,11 @@
  34. #include <stdio.h>
  35. #include <ctype.h>
  36. #include <string.h>
  37. +#ifdef _CROSS_RPCGEN_
  38. +#define gettext(X) (X)
  39. +#else
  40. #include <libintl.h>
  41. +#endif
  42. #include "rpc_scan.h"
  43. #include "rpc_parse.h"
  44. #include "rpc_util.h"
  45. diff -Nur eglibc-2.11.1.orig/libc/timezone/Makefile eglibc-2.11.1/libc/timezone/Makefile
  46. --- eglibc-2.11.1.orig/libc/timezone/Makefile 2010-02-24 08:09:02.000000000 +0100
  47. +++ eglibc-2.11.1/libc/timezone/Makefile 2010-03-22 18:50:04.134408513 +0100
  48. @@ -181,8 +182,9 @@
  49. $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
  50. $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
  51. - gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
  52. - -DCROSS_ZIC $(compile-mkdep-flags)
  53. + gcc $< -c $(OUTPUT_OPTION) \
  54. + $(filter-out -DHAVE_GETTEXT,$(CFLAGS-$*.c)) \
  55. + $(CPPFLAGS-$*) -DCROSS_ZIC $(compile-mkdep-flags)
  56. $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
  57. gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@
  58. diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c eglibc-2.11.1/libc/sunrpc/rpc_main.c
  59. --- eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c 2010-02-24 08:10:00.000000000 +0100
  60. +++ eglibc-2.11.1/libc/sunrpc/rpc_main.c 2010-06-20 13:32:42.000000000 +0200
  61. @@ -37,7 +37,11 @@
  62. #include <stdio.h>
  63. #include <string.h>
  64. #include <unistd.h>
  65. +#ifdef _CROSS_RPCGEN_
  66. +#define gettext(X) (X)
  67. +#else
  68. #include <libintl.h>
  69. +#endif
  70. #include <ctype.h>
  71. #include <sys/types.h>
  72. #include <sys/param.h>
  73. @@ -996,10 +1000,12 @@
  74. abort ();
  75. temp = rindex (cmd->infile, '.');
  76. cp = stpcpy (mkfilename, "Makefile.");
  77. - if (temp != NULL)
  78. - *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
  79. - else
  80. + if (temp != NULL) {
  81. + strncpy (cp, cmd->infile, temp - cmd->infile);
  82. + cp[temp - cmd->infile - 1] = '\0';
  83. + } else {
  84. stpcpy (cp, cmd->infile);
  85. + }
  86. }
  87. else