1
0

600-macOS.patch 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --- a/communicate.c
  2. +++ b/communicate.c
  3. @@ -441,6 +441,10 @@ void semaphore_down(){
  4. #else /* FAKEROOT_FAKENET */
  5. +#ifndef SOL_TCP
  6. +# define SOL_TCP 6 /* this should probably be done with getprotoent */
  7. +#endif
  8. +
  9. static struct sockaddr *get_addr(void)
  10. {
  11. static struct sockaddr_in addr = { 0, 0, { 0 } };
  12. --- a/libfakeroot_inode64.c
  13. +++ b/libfakeroot_inode64.c
  14. @@ -25,7 +25,7 @@
  15. #include "config.h"
  16. #include "communicate.h"
  17. -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
  18. +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
  19. #include <stdio.h>
  20. #include <spawn.h>
  21. --- a/wrapfunc.inp
  22. +++ b/wrapfunc.inp
  23. @@ -48,9 +48,11 @@ getattrlist$UNIX2003;int;(const char *pa
  24. #endif
  25. #endif
  26. #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
  27. +#if !__DARWIN_ONLY_64_BIT_INO_T
  28. lstat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf)
  29. stat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf)
  30. fstat$INODE64;int;(int fd, struct stat *buf);(fd, buf)
  31. +#endif
  32. posix_spawn;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp)
  33. posix_spawnp;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp)
  34. #endif
  35. @@ -229,7 +231,7 @@ facl;int;(int fd, int cmd, int cnt, void
  36. #ifdef HAVE_FTS_READ
  37. fts_read;FTSENT *;(FTS *ftsp);(ftsp)
  38. #ifdef __APPLE__
  39. -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
  40. +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
  41. fts_read$INODE64;FTSENT *;(FTS *ftsp);(ftsp)
  42. #endif
  43. #endif /* ifdef __APPLE__ */
  44. @@ -237,7 +239,7 @@ fts_read$INODE64;FTSENT *;(FTS *ftsp);(f
  45. #ifdef HAVE_FTS_CHILDREN
  46. fts_children;FTSENT *;(FTS *ftsp, int options);(ftsp, options)
  47. #ifdef __APPLE__
  48. -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
  49. +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
  50. fts_children$INODE64;FTSENT *;(FTS *ftsp, int options);(ftsp, options)
  51. #endif
  52. #endif /* ifdef __APPLE__ */