chiark / gitweb /
Bump version to 7.0.1~iwj0
[chiark-utils.git] / fishdescriptor / py / fishdescriptor / indonor.py
index 20bc8071b6d0f7eb9b1223c8269e90e0c0a05ebe..d911bf85c52d772a10bf7e3ad9f715eba670149f 100644 (file)
@@ -27,6 +27,7 @@ import copy
 import os
 import sys
 import socket
+import errno
 
 def _string_bytearray(s):
     # gets us bytes in py2 and py3
@@ -142,7 +143,7 @@ class DonorImplementation():
         # in my browser).  Also the error is very nonspecific :-/.
         # This seems to happen on jessie, and is fixed in stretch.
         # Anyway:
-        return parse_eval(expr_pat % '(*((int (*)(void))__errno_location)())')
+        return parse_eval(expr_pat % '(*((int*(*)(void))__errno_location)())')
 
     # calling functions (need to cast the function name to the right
     # type in case maybe gdb doesn't know the type)
@@ -212,7 +213,7 @@ class DonorImplementation():
         )
         if r < 0:
             errnoval = di._parse_eval_errno('%s')
-            if errnoval != os.errno.EEXIST:
+            if errnoval != errno.EEXIST:
                 raise RuntimeError("mkdir %s failed: `%s'" %
                                    (repr(path), os.strerror(errnoval)))
             return 0