0004-disable-ustat-on-uClibc.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. uClibc-ng need __UCLIBC_SV4_DEPRECATED__ enabled for ustat
  2. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  3. diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat01.c ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat01.c
  4. --- ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat01.c 2016-01-26 13:35:25.000000000 +0100
  5. +++ ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat01.c 2016-03-05 01:15:39.492789841 +0100
  6. @@ -20,7 +20,9 @@
  7. */
  8. #include <unistd.h>
  9. +#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
  10. #include <ustat.h>
  11. +#endif
  12. #include <errno.h>
  13. #include <sys/types.h>
  14. #include <sys/stat.h>
  15. @@ -30,6 +32,9 @@
  16. static void setup(void);
  17. char *TCID = "ustat01";
  18. +
  19. +#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
  20. +
  21. int TST_TOTAL = 1;
  22. static dev_t dev_num;
  23. @@ -79,3 +84,10 @@
  24. dev_num = buf.st_dev;
  25. }
  26. +#else /* systems that dont support ustat */
  27. +int main(void)
  28. +{
  29. + tst_brkm(TCONF, NULL, "system doesn't have ustat support");
  30. +}
  31. +#endif
  32. +
  33. diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat02.c ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat02.c
  34. --- ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat02.c 2016-01-26 13:35:25.000000000 +0100
  35. +++ ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat02.c 2016-03-05 01:15:55.677411889 +0100
  36. @@ -21,7 +21,9 @@
  37. */
  38. #include <unistd.h>
  39. +#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
  40. #include <ustat.h>
  41. +#endif
  42. #include <errno.h>
  43. #include <sys/stat.h>
  44. #include <sys/types.h>
  45. @@ -32,6 +34,8 @@
  46. char *TCID = "ustat02";
  47. +#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__)
  48. +
  49. static dev_t invalid_dev = -1;
  50. static dev_t root_dev;
  51. struct ustat ubuf;
  52. @@ -101,3 +105,9 @@
  53. root_dev = buf.st_dev;
  54. }
  55. +#else /* systems that dont support ustat */
  56. +int main(void)
  57. +{
  58. + tst_brkm(TCONF, NULL, "system doesn't have ustat support");
  59. +}
  60. +#endif