Skip to content

Commit adb3a3e

Browse files
pinheadmzlaanwj
andcommitted
configure: test for unix domain sockets
Copied from bitcoin/bitcoin#9979 Co-authored-by: laanwj <[email protected]>
1 parent 8da62a1 commit adb3a3e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

configure.ac

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,10 +1195,23 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
11951195
]], [[
11961196
getauxval(AT_HWCAP);
11971197
]])],
1198-
[ AC_MSG_RESULT([yes]); HAVE_STRONG_GETAUXVAL=1; AC_DEFINE([HAVE_STRONG_GETAUXVAL], [1], [Define this symbol to build code that uses getauxval)]) ],
1198+
[ AC_MSG_RESULT([yes]); HAVE_STRONG_GETAUXVAL=1; AC_DEFINE([HAVE_STRONG_GETAUXVAL], [1], [Define this symbol to build code that uses getauxval]) ],
11991199
[ AC_MSG_RESULT([no]); HAVE_STRONG_GETAUXVAL=0 ]
12001200
)
12011201

1202+
# Check for UNIX sockets
1203+
AC_MSG_CHECKING(for sockaddr_un)
1204+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1205+
#include <sys/socket.h>
1206+
#include <sys/un.h>
1207+
]], [[
1208+
struct sockaddr_un addr;
1209+
addr.sun_family = AF_UNIX;
1210+
]])],
1211+
[ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SOCKADDR_UN], [1], [Define this symbol if platform supports unix domain sockets]) ],
1212+
[ AC_MSG_RESULT([no]); ]
1213+
)
1214+
12021215
have_any_system=no
12031216
AC_MSG_CHECKING([for std::system])
12041217
AC_LINK_IFELSE(

0 commit comments

Comments
 (0)