I am getting the same error (in centos54 nginx-0.7.67). I also tried the patch, just edited the respective files by myself, but still getting the error.
This is the error message I am getting:
[code]
make[2]: Entering directory `/root/nginx-0.7.67/objs/src/http/modules/perl'
gcc -c -I ../../../../../src/core -I ../../../../../src/event -I ../../../../../src/os/unix -I ../../../../../src/http -I ../../../../../src/http/modules -I ../../../../../src/http/modules/perl -I ../../../../../objs -I /root/pcre-8.10 -I ../../../../..//openssl/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -g -O -DVERSION=\"0.7.67\" -DXS_VERSION=\"0.7.67\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" nginx.c
In file included from ../../../../../src/core/ngx_core.h:70,
from nginx.xs:10:
../../../../../src/event/ngx_event_openssl.h:14:25: error: openssl/ssl.h: No such file or directory
../../../../../src/event/ngx_event_openssl.h:15:25: error: openssl/err.h: No such file or directory
../../../../../src/event/ngx_event_openssl.h:16:26: error: openssl/conf.h: No such file or directory
../../../../../src/event/ngx_event_openssl.h:17:28: error: openssl/engine.h: No such file or directory
../../../../../src/event/ngx_event_openssl.h:18:25: error: openssl/evp.h: No such file or directory
In file included from ../../../../../src/core/ngx_core.h:70,
from nginx.xs:10:
../../../../../src/event/ngx_event_openssl.h:28: error: expected specifier-qualifier-list before ‘SSL_CTX’
../../../../../src/event/ngx_event_openssl.h:34: error: expected specifier-qualifier-list before ‘SSL’
../../../../../src/event/ngx_event_openssl.h:109: error: expected ‘)’ before ‘*’ token
../../../../../src/event/ngx_event_openssl.h:110: error: expected declaration specifiers or ‘...’ before ‘SSL_SESSION’
In file included from ../../../../../src/http/ngx_http.h:30,
from nginx.xs:11:
../../../../../src/http/ngx_http_upstream_round_robin.h:33: error: expected specifier-qualifier-list before ‘SSL_SESSION’
make[2]: *** [nginx.o] Error 1
make[2]: Leaving directory `/root/nginx-0.7.67/objs/src/http/modules/perl'
make[1]: *** [objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.so] Error 2
make[1]: Leaving directory `/root/nginx-0.7.67'
make: *** [build] Error 2
[/code]