Skip to content

Commit fffc91d

Browse files
committed
strdup not available in MSVC compiler
- Added define to avoid the following warning, treated as an error by the nginx build system: warning C4996: 'strdup': The POSIX name for this item is deprecated. Ins tead, use the ISO C++ conformant name: _strdup. See online help for details.
1 parent 4fc47e3 commit fffc91d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ngx_http_modsecurity_module.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
#include <ngx_core.h>
2626
#include <ngx_http.h>
2727

28+
#ifdef _MSC_VER
29+
#define strdup _strdup
30+
#endif
31+
2832
static ngx_int_t ngx_http_modsecurity_init(ngx_conf_t *cf);
2933
static void *ngx_http_modsecurity_create_main_conf(ngx_conf_t *cf);
3034
static char *ngx_http_modsecurity_init_main_conf(ngx_conf_t *cf, void *conf);

0 commit comments

Comments
 (0)