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.

43 lines
1.2 KiB

  1. /*
  2. Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link>
  3. Permission to use, copy, modify, and/or distribute this software for any
  4. purpose with or without fee is hereby granted, provided that the above
  5. copyright notice and this permission notice appear in all copies.
  6. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  7. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  8. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  9. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  10. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  11. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  12. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  13. */
  14. #pragma once
  15. #if defined(__ANDROID__)
  16. # include <sys/cdefs.h>
  17. #elif defined(__APPLE__)
  18. # include <TargetConditionals.h>
  19. #elif defined(__linux__)
  20. # include <features.h>
  21. #endif
  22. #ifdef USE_XATTR
  23. # ifdef __linux__
  24. # include <sys/types.h>
  25. # include <sys/xattr.h>
  26. # else
  27. # undef USE_XATTR
  28. # warning "USE_XATTR unset: xattrs disabled"
  29. # endif
  30. #endif
  31. #ifndef XATTR_CREATE
  32. # define XATTR_CREATE 0x1
  33. #endif
  34. #ifndef XATTR_REPLACE
  35. # define XATTR_REPLACE 0x2
  36. #endif