aboutsummaryrefslogtreecommitdiff
path: root/src/pj_open_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pj_open_lib.c')
-rw-r--r--src/pj_open_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c
index b15cbdf6..22c180a8 100644
--- a/src/pj_open_lib.c
+++ b/src/pj_open_lib.c
@@ -166,6 +166,9 @@ pj_open_lib(projCtx ctx, char *name, char *mode) {
name, sysname,
fid == NULL ? "failed" : "succeeded" );
+ if( ctx->last_errno == 0 && errno != 0 )
+ pj_ctx_set_errno( ctx, errno );
+
return(fid);
#else
return NULL;