Skip to content

Commit 14d6eed

Browse files
committed
Filter out if the struct is not defined either
1 parent 418e840 commit 14d6eed

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

erts/configure.ac

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,15 @@ AC_CHECK_TYPES([struct ip_mreqn], [], [],
16851685
#include <netinet/in.h>
16861686
])
16871687

1688+
AC_CHECK_TYPES([struct scm_timestamping], [], [],
1689+
[
1690+
#define _GNU_SOURCE
1691+
#include <sys/socket.h>
1692+
#include <linux/types.h>
1693+
#include <linux/errqueue.h>
1694+
#include <linux/net_tstamp.h>
1695+
])
1696+
16881697

16891698
dnl ----------------------------------------------------------------------
16901699
dnl Check the availability of systemd

erts/emulator/nifs/common/prim_socket_nif.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11177,7 +11177,7 @@ static BOOLEAN_T esock_cmsg_decode_timespec(ErlNifEnv *env,
1117711177
}
1117811178
#endif
1117911179

11180-
#ifdef SCM_TIMESTAMPING
11180+
#if defined(SCM_TIMESTAMPING) && defined(HAVE_STRUCT_SCM_TIMESTAMPING)
1118111181
static
1118211182
BOOLEAN_T esock_cmsg_encode_scm_timestamping(ErlNifEnv *env,
1118311183
unsigned char *data,
@@ -11752,7 +11752,7 @@ static ESockCmsgSpec cmsgLevelSocket[] =
1175211752
&esock_atom_timestampns},
1175311753
#endif
1175411754

11755-
#if defined(SCM_TIMESTAMPING)
11755+
#if defined(SCM_TIMESTAMPING) && defined(HAVE_STRUCT_SCM_TIMESTAMPING)
1175611756
{SCM_TIMESTAMPING,
1175711757
&esock_cmsg_encode_scm_timestamping, esock_cmsg_decode_scm_timestamping,
1175811758
&esock_atom_timestamping},

0 commit comments

Comments
 (0)