You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.4 KiB

  1. --- a/pkg/rootless/rootless_linux.c
  2. +++ b/pkg/rootless/rootless_linux.c
  3. @@ -19,6 +19,15 @@
  4. #include <sys/select.h>
  5. #include <stdio.h>
  6. +#ifndef TEMP_FAILURE_RETRY
  7. +#define TEMP_FAILURE_RETRY(expression) \
  8. + (__extension__ \
  9. + ({ long int __result; \
  10. + do __result = (long int) (expression); \
  11. + while (__result == -1L && errno == EINTR); \
  12. + __result; }))
  13. +#endif
  14. +
  15. #define cleanup_free __attribute__ ((cleanup (cleanup_freep)))
  16. #define cleanup_close __attribute__ ((cleanup (cleanup_closep)))
  17. #define cleanup_dir __attribute__ ((cleanup (cleanup_dirp)))
  18. @@ -72,15 +81,6 @@ int rename_noreplace (int olddirfd, cons
  19. return rename (oldpath, newpath);
  20. }
  21. -#ifndef TEMP_FAILURE_RETRY
  22. -#define TEMP_FAILURE_RETRY(expression) \
  23. - (__extension__ \
  24. - ({ long int __result; \
  25. - do __result = (long int) (expression); \
  26. - while (__result == -1L && errno == EINTR); \
  27. - __result; }))
  28. -#endif
  29. -
  30. static const char *_max_user_namespaces = "/proc/sys/user/max_user_namespaces";
  31. static const char *_unprivileged_user_namespaces = "/proc/sys/kernel/unprivileged_userns_clone";