From dd09c684e0baec6ecde5736a1486f2bc4d3213ef Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 2 Sep 2015 12:19:58 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/12088 Reviewed-by: Emmanuel Dreyfus Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Venky Shankar --- geo-replication/syncdaemon/libcxattr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'geo-replication/syncdaemon/libcxattr.py') 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): -- cgit