eglibc-cross.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc/types.h eglibc-2.18/libc/sunrpc/rpc/types.h
  2. --- eglibc-2.18.orig/libc/sunrpc/rpc/types.h 2013-09-13 10:20:22.000000000 +0200
  3. +++ eglibc-2.18/libc/sunrpc/rpc/types.h 2014-01-25 13:23:20.000000000 +0100
  4. @@ -70,6 +70,7 @@
  5. #endif
  6. #ifndef __u_char_defined
  7. +#if !defined(__APPLE__) && !defined(__BSD__)
  8. typedef __u_char u_char;
  9. typedef __u_short u_short;
  10. typedef __u_int u_int;
  11. @@ -79,11 +80,14 @@
  12. typedef __fsid_t fsid_t;
  13. # define __u_char_defined
  14. #endif
  15. +#endif
  16. #ifndef __daddr_t_defined
  17. +#if !defined(__APPLE__) && !defined(__BSD__)
  18. typedef __daddr_t daddr_t;
  19. typedef __caddr_t caddr_t;
  20. # define __daddr_t_defined
  21. #endif
  22. +#endif
  23. #include <sys/time.h>
  24. #include <sys/param.h>
  25. diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_main.c eglibc-2.18/libc/sunrpc/rpc_main.c
  26. --- eglibc-2.18.orig/libc/sunrpc/rpc_main.c 2013-09-13 10:20:22.000000000 +0200
  27. +++ eglibc-2.18/libc/sunrpc/rpc_main.c 2014-01-25 09:57:31.000000000 +0100
  28. @@ -38,7 +38,6 @@
  29. #include <stdio.h>
  30. #include <string.h>
  31. #include <unistd.h>
  32. -#include <libintl.h>
  33. #include <locale.h>
  34. #include <ctype.h>
  35. #include <sys/types.h>
  36. @@ -51,6 +50,8 @@
  37. #include "rpc_scan.h"
  38. #include "proto.h"
  39. +#define gettext(X) (X)
  40. +
  41. #include "../version.h"
  42. #define PACKAGE _libc_intl_domainname
  43. @@ -958,10 +959,12 @@
  44. abort ();
  45. temp = rindex (cmd->infile, '.');
  46. cp = stpcpy (mkfilename, "Makefile.");
  47. - if (temp != NULL)
  48. - *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
  49. - else
  50. + if (temp != NULL) {
  51. + strncpy (cp, cmd->infile, temp - cmd->infile);
  52. + cp[temp - cmd->infile - 1] = '\0';
  53. + } else {
  54. stpcpy (cp, cmd->infile);
  55. + }
  56. }
  57. else
  58. diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_scan.c eglibc-2.18/libc/sunrpc/rpc_scan.c
  59. --- eglibc-2.18.orig/libc/sunrpc/rpc_scan.c 2013-09-13 10:20:22.000000000 +0200
  60. +++ eglibc-2.18/libc/sunrpc/rpc_scan.c 2014-01-25 09:57:31.000000000 +0100
  61. @@ -37,12 +37,13 @@
  62. #include <stdio.h>
  63. #include <ctype.h>
  64. #include <string.h>
  65. -#include <libintl.h>
  66. #include "rpc_scan.h"
  67. #include "rpc_parse.h"
  68. #include "rpc_util.h"
  69. #include "proto.h"
  70. +#define gettext(X) (X)
  71. +
  72. #define startcomment(where) (where[0] == '/' && where[1] == '*')
  73. #define endcomment(where) (where[-1] == '*' && where[0] == '/')