Fixed synchronet compilation
This commit is contained in:
parent
a1e5aba0dd
commit
9379ef4226
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ include GNUmakef.def
|
|||||||
|
|
||||||
.PHONY: all clean distclean dirs sourcelists deps
|
.PHONY: all clean distclean dirs sourcelists deps
|
||||||
|
|
||||||
LIBS=gall gcfg gmb3 glibc uulib
|
LIBS=gall gcfg gmb3 glibc uulib smblib
|
||||||
EXECUTABLES=golded3 goldnode rddt
|
EXECUTABLES=golded3 goldnode rddt
|
||||||
|
|
||||||
all: sourcelists deps
|
all: sourcelists deps
|
||||||
|
@ -731,13 +731,13 @@ void SMBArea::save_hdr(int mode, gmsg* msg)
|
|||||||
smb_close_da(data);
|
smb_close_da(data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
smsg.hdr.offset = -1L;
|
smsg.hdr.offset = (ulong)-1L;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
smsg.hdr.offset = smb_hallocdat(data);
|
smsg.hdr.offset = smb_hallocdat(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(smsg.hdr.offset >= 0) {
|
if(smsg.hdr.offset != (ulong)-1L) {
|
||||||
fseek(data->sdt_fp, smsg.hdr.offset, SEEK_SET);
|
fseek(data->sdt_fp, smsg.hdr.offset, SEEK_SET);
|
||||||
ushort xlat = XLAT_NONE;
|
ushort xlat = XLAT_NONE;
|
||||||
fwrite(&xlat, 2, 1, data->sdt_fp);
|
fwrite(&xlat, 2, 1, data->sdt_fp);
|
||||||
|
@ -427,7 +427,7 @@ int SMBCALL smb_getstatus(smb_t* smb)
|
|||||||
setvbuf(smb->shd_fp,smb->shd_buf,_IOFBF,SHD_BLOCK_LEN);
|
setvbuf(smb->shd_fp,smb->shd_buf,_IOFBF,SHD_BLOCK_LEN);
|
||||||
if(i==sizeof(smbstatus_t))
|
if(i==sizeof(smbstatus_t))
|
||||||
return(0);
|
return(0);
|
||||||
sprintf(smb->last_error,"read %d instead of %d",i,sizeof(smbstatus_t));
|
sprintf(smb->last_error,"read %d instead of %d",i,(int)sizeof(smbstatus_t));
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,7 +444,7 @@ int SMBCALL smb_putstatus(smb_t* smb)
|
|||||||
fflush(smb->shd_fp);
|
fflush(smb->shd_fp);
|
||||||
if(i==sizeof(smbstatus_t))
|
if(i==sizeof(smbstatus_t))
|
||||||
return(0);
|
return(0);
|
||||||
sprintf(smb->last_error,"wrote %d instead of %d",i,sizeof(smbstatus_t));
|
sprintf(smb->last_error,"wrote %d instead of %d",i,(int)sizeof(smbstatus_t));
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -639,7 +639,7 @@ int SMBCALL smb_getmsghdr(smb_t* smb, smbmsg_t* msg)
|
|||||||
=(dfield_t *)MALLOC(sizeof(dfield_t)*msg->hdr.total_dfields))==NULL) {
|
=(dfield_t *)MALLOC(sizeof(dfield_t)*msg->hdr.total_dfields))==NULL) {
|
||||||
smb_freemsgmem(msg);
|
smb_freemsgmem(msg);
|
||||||
sprintf(smb->last_error,"malloc failure of %d bytes for %d data fields"
|
sprintf(smb->last_error,"malloc failure of %d bytes for %d data fields"
|
||||||
,sizeof(dfield_t)*msg->hdr.total_dfields, msg->hdr.total_dfields);
|
,(int)sizeof(dfield_t)*msg->hdr.total_dfields, msg->hdr.total_dfields);
|
||||||
return(-3);
|
return(-3);
|
||||||
}
|
}
|
||||||
i=0;
|
i=0;
|
||||||
@ -664,7 +664,7 @@ int SMBCALL smb_getmsghdr(smb_t* smb, smbmsg_t* msg)
|
|||||||
smb_freemsgmem(msg);
|
smb_freemsgmem(msg);
|
||||||
sprintf(smb->last_error
|
sprintf(smb->last_error
|
||||||
,"realloc failure of %d bytes for header field data"
|
,"realloc failure of %d bytes for header field data"
|
||||||
,sizeof(void*)*(i+1));
|
,(int)sizeof(void*)*(i+1));
|
||||||
return(-3);
|
return(-3);
|
||||||
}
|
}
|
||||||
msg->hfield_dat=vpp;
|
msg->hfield_dat=vpp;
|
||||||
@ -672,7 +672,7 @@ int SMBCALL smb_getmsghdr(smb_t* smb, smbmsg_t* msg)
|
|||||||
smb_freemsgmem(msg);
|
smb_freemsgmem(msg);
|
||||||
sprintf(smb->last_error
|
sprintf(smb->last_error
|
||||||
,"realloc failure of %d bytes for header fields"
|
,"realloc failure of %d bytes for header fields"
|
||||||
,sizeof(hfield_t)*(i+1));
|
,(int)sizeof(hfield_t)*(i+1));
|
||||||
return(-3);
|
return(-3);
|
||||||
}
|
}
|
||||||
msg->hfield=vp;
|
msg->hfield=vp;
|
||||||
|
Reference in New Issue
Block a user