Patch to src/event/ngx_event_openssl.c (nginx 1.6.2)

nginx-1.6.2

make

[…]
src/event/ngx_event_openssl.c:2520:9: error: implicit declaration of
function ‘RAND_pseudo_bytes’ is invalid in C99
[-Werror,-Wimplicit-function-declaration]
RAND_pseudo_bytes(iv, 16);
^
1 error generated.

patch:

perl -i.bak -0p -e ‘s|(^#include <ngx_event.h>).*(typedef
struct)|$1\n#include <openssl/rand.h>\n\nint RAND_bytes(unsigned char
*buf, int num);\nint RAND_pseudo_bytes(unsigned char *buf, int
num);\n\n$2|ms’ ./src/event/ngx_event_openssl.c;

Posted at Nginx Forum: