Skip to content

Commit

Permalink
configure.ac: Detect sys/socket.h and update inclusion guards
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Baptiste Kempf <[email protected]>
  • Loading branch information
chouquette authored and jbkempf committed May 12, 2016
1 parent 4315c46 commit 4b3d783
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ AC_REPLACE_FUNCS([strlcpy])
AC_REPLACE_FUNCS([strndup])
AC_REPLACE_FUNCS([clock_gettime])

AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h])
AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h sys/socket.h])

## Configure random device path
AC_ARG_WITH([urandom],
Expand Down
3 changes: 2 additions & 1 deletion src/netbios_ns.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
#ifdef _WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
#else
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/netbios_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifndef _WIN32
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#else
#endif

#include "bdsm_debug.h"
#include "netbios_session.h"
Expand Down

0 comments on commit 4b3d783

Please sign in to comment.