diff --git a/include/apple/config.h b/include/apple/config.h index 9108896d..5dbee46e 100644 --- a/include/apple/config.h +++ b/include/apple/config.h @@ -32,7 +32,7 @@ /* #undef HAVE_LIBSOCKET */ /* Whether we have linger */ -/* #undef HAVE_LINGER */ +#define HAVE_LINGER 1 /* Define to 1 if you have the header file. */ #define HAVE_NETDB_H 1 diff --git a/include/module.modulemap b/include/module.modulemap new file mode 100644 index 00000000..a7b9a186 --- /dev/null +++ b/include/module.modulemap @@ -0,0 +1,21 @@ +module SMB2 [system] [extern_c] { + module LibSMB2 { + header "apple/config.h" + header "smb2/smb2-errors.h" + header "smb2/smb2.h" + header "smb2/libsmb2.h" + header "smb2/libsmb2-dcerpc.h" + header "smb2/libsmb2-dcerpc-lsa.h" + header "smb2/libsmb2-dcerpc-srvsvc.h" + } + + module Internal { + header "libsmb2-private.h" + } + + explicit module Raw { + header "smb2/libsmb2-raw.h" + } + + export SMB2 +} diff --git a/include/smb2/libsmb2-raw.h b/include/smb2/libsmb2-raw.h index eeab2435..9e8c7514 100644 --- a/include/smb2/libsmb2-raw.h +++ b/include/smb2/libsmb2-raw.h @@ -319,6 +319,7 @@ struct smb2_pdu *smb2_cmd_set_info_async(struct smb2_context *smb2, smb2_command_cb cb, void *cb_data); struct smb2_pdu *smb2_cmd_set_info_reply_async(struct smb2_context *smb2, + struct smb2_set_info_request *req, smb2_command_cb cb, void *cb_data); /* diff --git a/include/smb2/libsmb2.h b/include/smb2/libsmb2.h index 22c51b8f..290502f1 100644 --- a/include/smb2/libsmb2.h +++ b/include/smb2/libsmb2.h @@ -19,10 +19,6 @@ #ifndef _LIBSMB2_H_ #define _LIBSMB2_H_ -#ifdef __APPLE__ /* Some platforms doesn´t support stdint.h */ -#include -#endif - #ifdef __cplusplus extern "C" { #endif @@ -1271,11 +1267,7 @@ int smb2_serve_port(struct smb2_server *server, const int max_connections, smb2_ * separation between dcerpc and smb2, so we need to include this header * here to retain compatibility for apps that depend on those symbols. */ -#ifdef __APPLE__ -#include -#else #include -#endif #ifdef __cplusplus } diff --git a/include/smb2/smb2.h b/include/smb2/smb2.h index 22ffeff7..a9f4b4f0 100644 --- a/include/smb2/smb2.h +++ b/include/smb2/smb2.h @@ -19,10 +19,14 @@ #ifndef _SMB2_H_ #define _SMB2_H_ -#ifdef __APPLE__ -#include -#else #include + +#ifdef HAVE_STDINT_H +#include +#endif + +#ifdef HAVE_TIME_H +#include #endif #ifdef __cplusplus diff --git a/lib/libsmb2.c b/lib/libsmb2.c index b82698a4..2f4e1ad8 100644 --- a/lib/libsmb2.c +++ b/lib/libsmb2.c @@ -3124,7 +3124,7 @@ smb2_set_info_request_cb(struct smb2_server *server, struct smb2_context *smb2, &err, SMB2_SET_INFO, SMB2_STATUS_NOT_IMPLEMENTED, NULL, cb_data); } else if (!ret) { - pdu = smb2_cmd_set_info_reply_async(smb2, NULL, cb_data); + pdu = smb2_cmd_set_info_reply_async(smb2, req, NULL, cb_data); } if (pdu != NULL) { smb2_queue_pdu(smb2, pdu); diff --git a/module.modulemap b/module.modulemap deleted file mode 100644 index 8607d579..00000000 --- a/module.modulemap +++ /dev/null @@ -1,21 +0,0 @@ -module SMB2 [extern_c] { - module LibSMB2 { - header "include/apple/config.h" - header "include/smb2/libsmb2.h" - header "include/smb2/libsmb2-dcerpc.h" - header "include/smb2/libsmb2-dcerpc-lsa.h" - header "include/smb2/libsmb2-dcerpc-srvsvc.h" - header "include/smb2/smb2.h" - header "include/smb2/smb2-errors.h" - } - - module Internal { - header "include/libsmb2-private.h" - } - - explicit module Raw { - header "include/smb2/libsmb2-raw.h" - } - - export SMB2 -}