summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBohdan Kmit <bkmit@maytech.net>2012-09-25 12:43:55 +0300
committerBohdan Kmit <bkmit@maytech.net>2012-09-25 12:43:55 +0300
commit0a4d72de6519bfd20277e38278888d695ddbddd4 (patch)
treea968d029523b3f9ea904849b5aad109a0e016000
parentffea9aef0bf8a4939b81813ee23f9f9b1713ad89 (diff)
downloadxattr-0a4d72de6519bfd20277e38278888d695ddbddd4.tar.gz
fix solaris studio compilation
-rw-r--r--xattr/_xattr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xattr/_xattr.c b/xattr/_xattr.c
index 1588e8f..747d907 100644
--- a/xattr/_xattr.c
+++ b/xattr/_xattr.c
@@ -1,7 +1,7 @@
#include "Python.h"
#ifdef __FreeBSD__
#include <sys/extattr.h>
-#elif defined(__SUN__) || defined(__sun__)
+#elif defined(__SUN__) || defined(__sun__) || defined(sun)
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -232,7 +232,7 @@ static ssize_t xattr_flistxattr(int fd, char *namebuf, size_t size, int options)
return rv;
}
-#elif defined(__SUN__) || defined(__sun__)
+#elif defined(__SUN__) || defined(__sun__) || define(sun)
/* Solaris 9 and later compatibility API */
#define XATTR_XATTR_NOFOLLOW 0x0001
@@ -240,7 +240,9 @@ static ssize_t xattr_flistxattr(int fd, char *namebuf, size_t size, int options)
#define XATTR_XATTR_REPLACE 0x0004
#define XATTR_XATTR_NOSECURITY 0x0008
-#define u_int32_t unsigned int
+#ifndef u_int32_t
+#define u_int32_t uint32_t
+#endif
static ssize_t xattr_fgetxattr(int fd, const char *name, void *value,
ssize_t size, u_int32_t position, int options)