Skip to content

Commit

Permalink
o AIX 7 defines sys_nerr in errno.h, therefore <errno.h> included
Browse files Browse the repository at this point in the history
in the sys_nerr test.

o When sys_nerr and _sys_nerr are missed on a particular platform
and our euristic for a maximum errno detection applied always
print the maximum errno number we reached instead of printing void.[*]

* patch from Maxim Dounin

This commit makes possible to build nginx on AIX 7.1.
  • Loading branch information
Maxim Konovalov committed Nov 21, 2011
1 parent df56c2e commit d4a2f14
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions auto/unix
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@ ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0)"
ngx_feature="sys_nerr"
ngx_feature_name="NGX_SYS_NERR"
ngx_feature_run=value
ngx_feature_incs='#include <stdio.h>'
ngx_feature_incs='#include <errno.h>
#include <stdio.h>'
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test='printf("%d", sys_nerr);'
Expand Down Expand Up @@ -538,10 +539,10 @@ if [ $ngx_found = no ]; then
|| p == NULL
|| strncmp(p, "Unknown error", 13) == 0)
{
printf("%d", n);
return 0;
break;
}
}'
}
printf("%d", n);'
. auto/feature
fi

Expand Down

0 comments on commit d4a2f14

Please sign in to comment.