     }
 }
 
-func wrapSyscall<A>(function: @autoclosure () -> String,
-                    _ successCondition: (A) -> Bool, _ fn: () -> A) throws -> A {
+func wrapSyscall(function: @autoclosure () -> String,
+                    _ successCondition: (Int) -> Bool, _ fn: () -> Int) throws -> Int {
     do {
         return try withErrno(hint: "", successCondition: successCondition, fn)
     } catch let e as POSIXReasonedError {

        throw error
    }
}

    }
}

func wrapSyscall(_ successCondition: (Int) -> Bool,
                        function: @autoclosure () -> String, _ fn: () -> Int) throws -> Int {
    return try wrapSyscall(function: function, successCondition, fn)
}

func wrapSyscallMayBlock(_ successCondition: (Int) -> Bool,
                 function: @autoclosure () -> String, _ fn: () -> Int) throws -> Int? {
    do {
        return try wrapSyscall(function: function, successCondition, fn)
    } catch let error as IOError {
