Skip to content

geo_lookup.cc:124:32: error: invalid conversion from ‘const MMDB_s*’ to ‘MMDB_s*’ [-fpermissive] #2371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gitcnd opened this issue Jul 24, 2020 · 2 comments
Assignees
Labels
3.x Related to ModSecurity version 3.x

Comments

@gitcnd
Copy link

gitcnd commented Jul 24, 2020

On CentOS Linux release 8.2.2004 (Core);

bash: git clone https://github.com/SpiderLabs/ModSecurity.git
bash: cd ModSecurity/
bash: ./build.sh
bash: ./configure
bash: git submodule init
bash: git submodule update
bash: ./configure
bash: make

...

utils/geo_lookup.cc: In member function ‘bool modsecurity::Utils::GeoLookup::lookup(const string&, modsecurity::Transaction*, std::function<bool(int, const std::__cxx11::basic_string&)>) const’:
utils/geo_lookup.cc:124:32: error: invalid conversion from ‘const MMDB_s*’ to ‘MMDB_s*’ [-fpermissive]
r = MMDB_lookup_string(&mmdb, target.c_str(), &gai_error, &mmdb_error);
^~~~~
In file included from ../src/utils/geo_lookup.h:22,
from utils/geo_lookup.cc:25:
/usr/include/maxminddb.h:195:66: note: initializing argument 1 of ‘MMDB_lookup_result_s MMDB_lookup_string(MMDB_s*, const char*, int*, int*)’
extern MMDB_lookup_result_s MMDB_lookup_string(MMDB_s *const mmdb,
~~~~~~~~~~~~~~^~~~
make[3]: *** [Makefile:3169: utils/libmodsecurity_la-geo_lookup.lo] Error 1
make[3]: Leaving directory '/usr/local/bin/src/ModSecurity/src'
make[2]: *** [Makefile:3463: all-recursive] Error 1
make[2]: Leaving directory '/usr/local/bin/src/ModSecurity/src'
make[1]: *** [Makefile:1218: all] Error 2
make[1]: Leaving directory '/usr/local/bin/src/ModSecurity/src'
make: *** [Makefile:1029: all-recursive] Error 1
[ModSecurity]$

@zimmerle
Copy link
Contributor

That is a duplicate of #2364.

@zimmerle zimmerle self-assigned this Jul 27, 2020
@zimmerle zimmerle added the 3.x Related to ModSecurity version 3.x label Jul 27, 2020
@lxjlxk
Copy link

lxjlxk commented May 6, 2022

这是 #2364 的副本。

这个怎么解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Related to ModSecurity version 3.x
Projects
None yet
Development

No branches or pull requests

3 participants