mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-06 04:51:40 -07:00
SunOS compile support: add -lrt to support nanosleep(); add definition of strndup()
This commit is contained in:
parent
796992d82d
commit
34f5d55b84
2 changed files with 26 additions and 1 deletions
6
configure
vendored
6
configure
vendored
|
@ -1220,6 +1220,10 @@ if [ "X" != "X$DEBUG" ]; then
|
||||||
echo DEBUG: STRIP=$STRIP
|
echo DEBUG: STRIP=$STRIP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$SYSS" = "SunOS" ]; then
|
||||||
|
XLIBS="$XLIBS -lrt"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Writing Makefile.in ..."
|
echo "Writing Makefile.in ..."
|
||||||
if [ "X" != "X$FHS" ]; then
|
if [ "X" != "X$FHS" ]; then
|
||||||
echo "MANDIR = /share/man/man1" >> Makefile.in
|
echo "MANDIR = /share/man/man1" >> Makefile.in
|
||||||
|
@ -1263,7 +1267,7 @@ if [ "x$WINDRES" = "x" ]; then
|
||||||
echo HYDRA_LOGO= >> Makefile
|
echo HYDRA_LOGO= >> Makefile
|
||||||
echo PWI_LOGO= >> Makefile
|
echo PWI_LOGO= >> Makefile
|
||||||
fi
|
fi
|
||||||
if [ "$GCCSEC" = "yes" ]; then
|
if [ "$GCCSEC" = "yes" ] && [ "$SYSS" != "SunOS" ]; then
|
||||||
echo "SEC=$GCCSECOPT" >> Makefile
|
echo "SEC=$GCCSECOPT" >> Makefile
|
||||||
else
|
else
|
||||||
echo "SEC=" >> Makefile
|
echo "SEC=" >> Makefile
|
||||||
|
|
|
@ -114,6 +114,27 @@ ptr_header_node header_exists(ptr_header_node * ptr_head, char *header_name, cha
|
||||||
return found_header;
|
return found_header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__sun)
|
||||||
|
/* Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu> */
|
||||||
|
char *
|
||||||
|
strndup (const char *s, size_t n)
|
||||||
|
{
|
||||||
|
char *result;
|
||||||
|
size_t len = strlen (s);
|
||||||
|
|
||||||
|
if (n < len)
|
||||||
|
len = n;
|
||||||
|
|
||||||
|
result = (char *) malloc (len + 1);
|
||||||
|
if (!result)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
memcpy (result, s, len);
|
||||||
|
result[len] = '\0';
|
||||||
|
return(result);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int append_cookie(char *name, char *value, ptr_cookie_node *last_cookie)
|
int append_cookie(char *name, char *value, ptr_cookie_node *last_cookie)
|
||||||
{
|
{
|
||||||
ptr_cookie_node new_ptr = (ptr_cookie_node) malloc(sizeof(t_cookie_node));
|
ptr_cookie_node new_ptr = (ptr_cookie_node) malloc(sizeof(t_cookie_node));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue