0002-avoid-glibc-specific-decls-defines.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 667137acaffb8d0cc62b47821a67a52ba0637d5c Mon Sep 17 00:00:00 2001
  2. From: Mike Frysinger <vapier@gentoo.org>
  3. Date: Fri, 10 Jan 2014 13:56:37 +0000
  4. Subject: avoid glibc-specific DECLS defines
  5. This matches what we do in all the other headers.
  6. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  7. ---
  8. diff --git a/include/xattr.h b/include/xattr.h
  9. index 70a84be..070d7c5 100644
  10. --- a/include/xattr.h
  11. +++ b/include/xattr.h
  12. @@ -30,8 +30,9 @@
  13. #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
  14. #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
  15. -
  16. -__BEGIN_DECLS
  17. +#ifdef __cplusplus
  18. +extern "C" {
  19. +#endif
  20. extern int setxattr (const char *__path, const char *__name,
  21. const void *__value, size_t __size, int __flags) __THROW;
  22. @@ -58,6 +59,8 @@ extern int removexattr (const char *__path, const char *__name) __THROW;
  23. extern int lremovexattr (const char *__path, const char *__name) __THROW;
  24. extern int fremovexattr (int __filedes, const char *__name) __THROW;
  25. -__END_DECLS
  26. +#ifdef __cplusplus
  27. +}
  28. +#endif
  29. #endif /* __XATTR_H__ */
  30. --
  31. cgit v0.9.0.2