mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-20 05:13:51 -07:00
Worked around APR_PATH_MAX errors on some Linuxes when SVN is enabled.
On Gentoo Linux (and possibly others?) with Subversion 1.12.0, compilation of hydra-svn.c fails with: In file included from /usr/include/subversion-1/svn_client.h:34, from hydra-svn.c:9: /usr/include/apr-1/apr.h:632:2: error: #error no decision has been made on APR_PATH_MAX for your platform #error no decision has been made on APR_PATH_MAX for your platform ^~~~~ This happens when PATH_MAX is not defined. PATH_MAX is defined by /usr/include/linux/limits.h, but rather than include'ing that directly and possibly breaking other platforms, include sys/param.h (which will include linux/limits.h indirectly) iff PATH_MAX is not defined and sys/param.h exists. I based the approach on how math.h is handled.
This commit is contained in:
parent
c4667685f7
commit
db9025bf86
2 changed files with 10 additions and 2 deletions
|
@ -6,6 +6,10 @@
|
|||
/* needed on openSUSE */
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#if !defined PATH_MAX && defined HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#include <svn_client.h>
|
||||
#include <svn_cmdline.h>
|
||||
#include <svn_pools.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue