Skip to content

Commit

Permalink
strdup not available in MSVC compiler
Browse files Browse the repository at this point in the history
- 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. Instead, use the ISO C++ conformant name: _strdup. See online help for details.
  • Loading branch information
eduar-hte committed Apr 29, 2024
1 parent 509cd6d commit 7b35e23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ngx_http_modsecurity_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#include <ngx_core.h>
#include <ngx_http.h>

#ifdef WIN32
#define strdup _strdup
#endif

static ngx_int_t ngx_http_modsecurity_init(ngx_conf_t *cf);
static void *ngx_http_modsecurity_create_main_conf(ngx_conf_t *cf);
static char *ngx_http_modsecurity_init_main_conf(ngx_conf_t *cf, void *conf);
Expand Down

0 comments on commit 7b35e23

Please sign in to comment.