2
1

samba4-0001-build-don-t-execute-tests-summary.c.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. From 960d710ee5410a5c03815a5ce6837203be00d218 Mon Sep 17 00:00:00 2001
  2. From: Gustavo Zacarias <gustavo@zacarias.com.ar>
  3. Date: Thu, 30 Jan 2014 11:14:27 -0300
  4. Subject: [PATCH 1/3] build: don't execute tests/summary.c
  5. tests/summary.c will never be able to be executed when cross compiling.
  6. Use #error and #warning directives to fail or warn accordingly when
  7. compiling it.
  8. Status: Upstream.
  9. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  10. ---
  11. tests/summary.c | 14 +++++---------
  12. wscript | 1 -
  13. 2 files changed, 5 insertions(+), 10 deletions(-)
  14. diff --git a/tests/summary.c b/tests/summary.c
  15. index 27f7d4d..0843ee2 100644
  16. --- a/tests/summary.c
  17. +++ b/tests/summary.c
  18. @@ -5,27 +5,23 @@ void exit(int);
  19. int main()
  20. {
  21. #if !defined(HAVE_FCNTL_LOCK)
  22. - printf("ERROR: No locking available. Running Samba would be unsafe\n");
  23. - exit(1);
  24. +#error "ERROR: No locking available. Running Samba would be unsafe"
  25. #endif
  26. #if !(defined(HAVE_IFACE_GETIFADDRS) || defined(HAVE_IFACE_IFCONF) || defined(HAVE_IFACE_IFREQ) || defined(HAVE_IFACE_AIX))
  27. - printf("WARNING: No automated network interface determination\n");
  28. +#warning "WARNING: No automated network interface determination"
  29. #endif
  30. #if !(defined(USE_SETEUID) || defined(USE_SETREUID) || defined(USE_SETRESUID) || defined(USE_SETUIDX) || defined(USE_LINUX_THREAD_CREDENTIALS))
  31. - printf("ERROR: no seteuid method available\n");
  32. - exit(1);
  33. +#error "ERROR: no seteuid method available"
  34. #endif
  35. #if !(defined(STAT_STATVFS) || defined(STAT_STATFS3_OSF1) || defined(STAT_STATFS2_BSIZE) || defined(STAT_STATFS4) || defined(STAT_STATFS2_FSIZE) || defined(STAT_STATFS2_FS_DATA))
  36. - printf("ERROR: No disk free routine!\n");
  37. - exit(1);
  38. +#error "ERROR: No disk free routine!"
  39. #endif
  40. #if !((defined(HAVE_RANDOM) || defined(HAVE_RAND)) && (defined(HAVE_SRANDOM) || defined(HAVE_SRAND)))
  41. - printf("ERROR: No random or srandom routine!\n");
  42. - exit(1);
  43. +#error "ERROR: No random or srandom routine!"
  44. #endif
  45. exit(0);
  46. diff --git a/wscript b/wscript
  47. index 47b7b50..26431a4 100644
  48. --- a/wscript
  49. +++ b/wscript
  50. @@ -170,7 +170,6 @@ def configure(conf):
  51. if not conf.CHECK_CODE('#include "tests/summary.c"',
  52. define='SUMMARY_PASSES',
  53. addmain=False,
  54. - execute=True,
  55. msg='Checking configure summary'):
  56. raise Utils.WafError('configure summary failed')
  57. --
  58. 1.8.3.2