summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-09-02 12:19:58 +0530
committerVenky Shankar <vshankar@redhat.com>2015-09-07 02:52:46 -0700
commitdd09c684e0baec6ecde5736a1486f2bc4d3213ef (patch)
tree93dd4f19056b2eee596c240b9d227c3887c3266e /geo-replication/syncdaemon
parent0e65ee0ceb8827ebac46bc6e714818d321cbd998 (diff)
geo-rep: Fix portability issues with NetBSD
Fixes portability issues in gverify.sh and libcxattr.py with NetBSD. Change-Id: Idfaa6cf3815136e6a2343aab98d979b6ab451bbd BUG: 1257847 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/12088 Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon')
-rw-r--r--geo-replication/syncdaemon/libcxattr.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/geo-replication/syncdaemon/libcxattr.py b/geo-replication/syncdaemon/libcxattr.py
index 74d120fa196..b69773df469 100644
--- a/geo-replication/syncdaemon/libcxattr.py
+++ b/geo-replication/syncdaemon/libcxattr.py
@@ -9,7 +9,7 @@
#
import os
-from ctypes import CDLL, c_int, create_string_buffer
+from ctypes import CDLL, create_string_buffer, get_errno
from ctypes.util import find_library
@@ -25,11 +25,11 @@ class Xattr(object):
sizes we expect
"""
- libc = CDLL(find_library("libc"))
+ libc = CDLL(find_library("libc"), use_errno=True)
@classmethod
def geterrno(cls):
- return c_int.in_dll(cls.libc, 'errno').value
+ return get_errno()
@classmethod
def raise_oserr(cls):