0005-Use-configure-test-for-struct-timespec.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From bf1eafb07297711baf9320b1edcca8a3376f117d Mon Sep 17 00:00:00 2001
  2. From: Natanael Copa <ncopa@alpinelinux.org>
  3. Date: Wed, 18 Nov 2015 09:03:00 +0000
  4. Subject: [PATCH] Use configure test for struct timespec
  5. Use the configure script to test for struct time spec instead of trying
  6. to keep track of what platforms has it.
  7. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
  8. [Retrieved from:
  9. http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-test-for-struct-timespec.patch?h=sumo]
  10. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  11. ---
  12. open-vm-tools/configure.ac | 1 +
  13. open-vm-tools/lib/include/hgfsUtil.h | 8 +-------
  14. 2 files changed, 2 insertions(+), 7 deletions(-)
  15. Index: open-vm-tools/configure.ac
  16. ===================================================================
  17. --- open-vm-tools.orig/configure.ac
  18. +++ open-vm-tools/configure.ac
  19. @@ -1127,6 +1127,7 @@ AC_TYPE_OFF_T
  20. AC_TYPE_PID_T
  21. AC_TYPE_SIZE_T
  22. AC_CHECK_MEMBERS([struct stat.st_rdev])
  23. +AC_CHECK_MEMBERS([struct timespec.tv_sec],[],[],[[#include <time.h>]])
  24. AC_HEADER_TIME
  25. AC_STRUCT_TM
  26. AC_C_VOLATILE
  27. Index: open-vm-tools/lib/include/hgfsUtil.h
  28. ===================================================================
  29. --- open-vm-tools.orig/lib/include/hgfsUtil.h
  30. +++ open-vm-tools/lib/include/hgfsUtil.h
  31. @@ -53,13 +53,7 @@
  32. # include <time.h>
  33. # endif
  34. # include "vm_basic_types.h"
  35. -# if !defined _STRUCT_TIMESPEC && \
  36. - !defined _TIMESPEC_DECLARED && \
  37. - !defined __timespec_defined && \
  38. - !defined sun && \
  39. - !defined __FreeBSD__ && \
  40. - !__APPLE__ && \
  41. - !defined _WIN32
  42. +# if !defined HAVE_STRUCT_TIMESPEC_TV_SEC
  43. struct timespec {
  44. time_t tv_sec;
  45. long tv_nsec;