diff --git a/srpt/Makefile b/srpt/Makefile index 503e56a77..bd7ead229 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -246,6 +246,12 @@ conftest/register_mad_agent/result-$(KVER).txt: \ echo "$(call run_conftest,register_mad_agent, \ -DREGISTER_MAD_AGENT_HAS_FLAGS_ARG)" >"$@" +conftest/srp_login_req_rdma/result-$(KVER).txt: \ + conftest/srp_login_req_rdma/srp_login_req_rdma.c \ + conftest/srp_login_req_rdma/Makefile + echo "$(call run_conftest_bool,srp_login_req_rdma, \ + HAVE_STRUCT_SRP_LOGIN_REQ_RDMA)" >"$@" + conftest/use_pre_440_wr_structure/result-$(KVER).txt: \ conftest/use_pre_440_wr_structure/use_pre_440_wr_structure.c \ conftest/use_pre_440_wr_structure/Makefile diff --git a/srpt/conftest/srp_login_req_rdma/Makefile b/srpt/conftest/srp_login_req_rdma/Makefile new file mode 100644 index 000000000..067f709fb --- /dev/null +++ b/srpt/conftest/srp_login_req_rdma/Makefile @@ -0,0 +1,3 @@ +LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE) + +obj-m += srp_login_req_rdma.o diff --git a/srpt/conftest/srp_login_req_rdma/srp_login_req_rdma.c b/srpt/conftest/srp_login_req_rdma/srp_login_req_rdma.c new file mode 100644 index 000000000..76f5c3402 --- /dev/null +++ b/srpt/conftest/srp_login_req_rdma/srp_login_req_rdma.c @@ -0,0 +1,9 @@ +#include +#include + +static int modinit(void) +{ + return sizeof(struct srp_login_req_rdma); +} + +module_init(modinit); diff --git a/srpt/src/ib_srpt.h b/srpt/src/ib_srpt.h index 62a5eccd0..7d7c6d7f5 100644 --- a/srpt/src/ib_srpt.h +++ b/srpt/src/ib_srpt.h @@ -469,6 +469,7 @@ struct srpt_device { struct ib_event_handler event_handler; }; +#if !HAVE_STRUCT_SRP_LOGIN_REQ_RDMA /** * struct srp_login_req_rdma - RDMA/CM login parameters. * @@ -487,5 +488,6 @@ struct srp_login_req_rdma { u8 initiator_port_id[16]; u8 target_port_id[16]; }; +#endif /* !HAVE_STRUCT_SRP_LOGIN_REQ_RDMA */ #endif /* IB_SRPT_H */