Skip to content
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

C99 compatibility fixes #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ AC_CHECK_LIB(inet6, main,
AC_CHECK_FUNCS(memcpy strtol)
AC_CHECK_FUNCS(strcasecmp strncasecmp getopt_long)
AC_HEADER_STDC([])
AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h netdb.h sys/time.h sys/stat.h sys/fcntl.h malloc.h locale.h stdint.h inttypes.h idna.h)
AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h netdb.h sys/time.h sys/stat.h sys/fcntl.h malloc.h locale.h stdint.h inttypes.h idna.h arpa/inet.h)
AC_HEADER_TIME


Expand All @@ -139,13 +139,16 @@ AC_TRY_RUN(
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
int main()
{
struct in6_addr addr6;
if (inet_pton(AF_INET6, "::1", &addr6) < 1)
exit(1);
return 1;
else
exit(0);
return 0;
}
], [
AC_MSG_RESULT(yes)
Expand Down
1 change: 1 addition & 0 deletions include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ char *create_string(const char *fmt, ...);
int split_host_from_query(struct s_whois_query *wq);
int make_connect(const char *, int);
int add_text_to_buffer(char **, const char *);
void timeout_init(void);


#endif
2 changes: 1 addition & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ split_host_from_query(struct s_whois_query *wq)
* file.
*/
void
timeout_init()
timeout_init(void)
{
int iret;
char *ret = "75", *ret2;
Expand Down