Skip to content

Commit

Permalink
Fix build on amiga os.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolf3s committed Oct 12, 2024
1 parent fe2106a commit cd5dc6c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Makefile.AMIGA
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OPTIMIZE = -O2
DEBUG = -gstabs
WARNINGS = -Wall -Werror -Wwrite-strings
INCLUDES = -I. -I../include -I../include/smb2 -I../include/amiga_os
DEFINES = -DHAVE_CONFIG_H "-D_U_=__attribute__((unused))" -DNEED_POLL -DNEED_GETADDRINFO -DNEED_FREEADDRINFO -DNEED_GETLOGIN_R -DHAVE_LINGER
DEFINES = -DHAVE_CONFIG_H "-D_U_=__attribute__((unused))" -DHAVE_ADDRINFO -DNEED_POLL -DNEED_GETADDRINFO -DNEED_FREEADDRINFO -DNEED_GETLOGIN_R -DHAVE_LINGER

CFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(INCLUDES) $(DEFINES)

Expand Down
1 change: 1 addition & 0 deletions lib/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ struct addrinfo {
struct sockaddr *ai_addr; /* binary address */
struct addrinfo *ai_next; /* next structure in linked list */
};

#endif

int poll(struct pollfd *fds, unsigned int nfds, int timo);
Expand Down
1 change: 1 addition & 0 deletions lib/libsmb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3403,6 +3403,7 @@ smb2_negotiate_request_cb(struct smb2_context *smb2, int status, void *command_d
struct smb2_pdu *pdu;
uint16_t dialects[SMB2_NEGOTIATE_MAX_DIALECTS];
int dialect_count;
int d;
int dialect_index;
struct smb2_timeval now;
/*void *auth_data;*/

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Expand Down
5 changes: 2 additions & 3 deletions lib/smb2-cmd-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,10 @@ smb2_process_ioctl_request_variable(struct smb2_context *smb2,

switch (req->ctl_code) {
case SMB2_FSCTL_VALIDATE_NEGOTIATE_INFO:
{
struct smb2_ioctl_validate_negotiate_info *info;
/* this one is handled locally regardless of proxy or not */
ptr = smb2_alloc_init(smb2,
sizeof(struct smb2_ioctl_validate_negotiate_info));
info = ptr;
struct smb2_ioctl_validate_negotiate_info *info = ptr;

smb2_get_uint32(&vec, 0, &info->capabilities);
memcpy(info->guid, &vec.buf[4], 16);
Expand Down

0 comments on commit cd5dc6c

Please sign in to comment.