Skip to content

Commit

Permalink
Fix issues with solaris compilation (fixes #341).
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jan 20, 2017
1 parent 023d39e commit 98c6094
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/Xrd/XrdSendQ.cc
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ int XrdSendQ::SendNB(const struct iovec *iov, int iocnt, int bytes, int &iovX)
// All done
//
return 0;
}
#endif
}

/******************************************************************************/
/* T e r m i n a t e */
Expand Down
3 changes: 2 additions & 1 deletion src/XrdCl/XrdClMetalinkRedirector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ XRootDStatus MetalinkRedirector::HandleRequest( Message *msg, Stream *stream )
// if the metalink data haven't been loaded yet, make it pending
if( !pReady )
{
pPendingRedirects.push_back( std::make_pair( msg, stream ) );
pPendingRedirects.push_back(
std::make_pair( const_cast<const XrdCl::Message*>( msg), stream ) );
return XRootDStatus();
}
// otherwise generate a virtual response
Expand Down
2 changes: 1 addition & 1 deletion src/XrdCl/XrdClRedirectorRegistry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ XRootDStatus RedirectorRegistry::RegisterImpl( const URL &url, ResponseHandler *
if( !st.IsOK() )
delete redirector;
else
pRegistry[key] = std::make_pair( redirector, 1 );
pRegistry[key] = std::pair<VirtualRedirector*, size_t>( redirector, 1 );
return st;
}
else
Expand Down
1 change: 1 addition & 0 deletions src/XrdPosix/XrdPosix.hh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@

#define rename(a,b) XrdPosix_Rename(a,b)

#undef rewinddir
#define rewinddir(a) XrdPosix_Rewinddir(a)

#define rmdir(a) XrdPosix_Rmdir(a)
Expand Down
12 changes: 6 additions & 6 deletions src/XrdSec/XrdSecProtect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ int XrdSecProtect::Secure(SecurityRequest *&newreq,

// Fill out the iovec
//
iov[0].iov_base = &mySeq;
iov[0].iov_base = (char *)&mySeq;
iov[0].iov_len = sizeof(mySeq);
iov[1].iov_base = &thereq;
iov[1].iov_base = (char *)&thereq;
iov[1].iov_len = sizeof(ClientRequest);
if (n < 3) nodata = true;
else {iov[2].iov_base = (void *)payload;
else {iov[2].iov_base = (char *)payload;
iov[2].iov_len = paysize;
}

Expand Down Expand Up @@ -423,12 +423,12 @@ const char *XrdSecProtect::Verify(SecurityRequest &secreq,

// Fill out the iovec to recompute the hash
//
iov[0].iov_base = &secreq.sigver.seqno;
iov[0].iov_base = (char *)&secreq.sigver.seqno;
iov[0].iov_len = sizeof(secreq.sigver.seqno);
iov[1].iov_base = &thereq;
iov[1].iov_base = (char *)&thereq;
iov[1].iov_len = sizeof(ClientRequest);
if (thereq.header.dlen == 0 || secreq.sigver.flags & kXR_nodata) n = 2;
else {iov[2].iov_base = (void *)thedata;
else {iov[2].iov_base = (char *)thedata;
iov[2].iov_len = ntohl(thereq.header.dlen);
n = 3;
}
Expand Down
2 changes: 1 addition & 1 deletion src/XrdSys/XrdSysLogging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ int XrdSysLogging::CopyTrunc(char *mbuff, struct iovec *iov, int iovcnt)

bool XrdSysLogging::EMsg(XrdSysLogger &logr, const char *msg)
{
struct iovec iov[] = {{0,0}, {(void *)msg,0}};
struct iovec iov[] = {{0,0}, {(char *)msg,0}};

iov[1].iov_len = strlen((const char *)iov[1].iov_base);
logr.Put(2, iov);
Expand Down
12 changes: 6 additions & 6 deletions src/XrdSys/XrdSysTrace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void XrdSysTrace::End()
// Make sure and endline character appears
//
if (vPnt >= iovMax) vPnt = iovMax-1;
ioVec[vPnt] .iov_base = (void *)"\n";
ioVec[vPnt] .iov_base = (char *)"\n";
ioVec[vPnt++].iov_len = 1;

// Output the line
Expand All @@ -119,10 +119,10 @@ XrdSysTrace& XrdSysTrace::operator<<(bool val)
//
if (vPnt < iovMax)
{if (val)
{ioVec[vPnt] .iov_base = (void *)"True";
{ioVec[vPnt] .iov_base = (char *)"True";
ioVec[vPnt++].iov_len = 4;
} else {
ioVec[vPnt] .iov_base = (void *)"False";
ioVec[vPnt] .iov_base = (char *)"False";
ioVec[vPnt++].iov_len = 5;
}
}
Expand All @@ -141,13 +141,13 @@ XrdSysTrace& XrdSysTrace::operator<<(char val)
//
if (vPnt < iovMax && dFree > 1)
{if (doHex)
{ioVec[vPnt] .iov_base = (void *)(&dBuff[dPnt]);
{ioVec[vPnt] .iov_base = (char *)(&dBuff[dPnt]);
ioVec[vPnt++].iov_len = 2;
dBuff[dPnt++] = hv[(val >> 4) & 0x0f];
dBuff[dPnt++] = hv[ val & 0xf0];
dFree -= 2;
} else {
ioVec[vPnt] .iov_base = (void *)(&dBuff[dPnt]);
ioVec[vPnt] .iov_base = (char *)(&dBuff[dPnt]);
ioVec[vPnt++].iov_len = 1;
dBuff[dPnt++] = val; dFree--;
}
Expand All @@ -165,7 +165,7 @@ XrdSysTrace& XrdSysTrace::operator<<(const char *val)
// If we have enough space then format the value
//
if (vPnt < iovMax)
{ioVec[vPnt] .iov_base = (void *)val;
{ioVec[vPnt] .iov_base = (char *)val;
ioVec[vPnt++].iov_len = strlen(val);
}
return *this;
Expand Down

0 comments on commit 98c6094

Please sign in to comment.