Skip to content

Commit 2a92433

Browse files
committed
fix for osx compiler
1 parent 9ec1ef6 commit 2a92433

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/ReadoutEquipment.cxx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,17 @@ int ReadoutEquipment::processRdh(DataBlockContainerReference& block)
727727
auto bitsChanged = std::bitset<sizeof(uint32_t)>(h.getDetectorField() ^ lastDetectorField[lid]);
728728
uint32_t nChanged = bitsChanged.count();
729729
if (nChanged == 1) {
730-
int bitChanged = bitsChanged._Find_first();
730+
int bitChanged = bitsChanged.size();
731+
#ifdef __linux__
732+
bitChanged = bitsChanged._Find_first();
733+
#else
734+
for(int bitix = 0; bitix < (int)bitsChanged.size(); bitix++) {
735+
if (bitsChanged[bitix]) {
736+
bitChanged = bitix;
737+
break;
738+
}
739+
}
740+
#endif
731741
bool isSet = std::bitset<sizeof(uint32_t)>(h.getDetectorField()).test(bitChanged);
732742

733743
//theLog.log(LogInfoDevel_(3011), "bitChanged=%d isSet=%d ctpRunBit=%d discardData=%d", (int)bitChanged, (int)isSet, (int)ctpRunBit, (int)discardData);
@@ -872,7 +882,7 @@ int ReadoutEquipment::processRdh(DataBlockContainerReference& block)
872882
}
873883
}
874884

875-
if ((isDefinedLastDetectorField)&&(pageOffset)) {
885+
if ((isDefinedLastDetectorField[linkId])&&(pageOffset)) {
876886
if (checkChangesInDetectorField(h, pageOffset)) {
877887
if (cfgRdhDumpWarningEnabled) {
878888
theLog.log(logRdhErrorsToken, "Equipment %d Link %d RDH #%d @ 0x%X : detector field changed not at page beginning", id, (int)blockHeader.linkId, rdhIndexInPage, (unsigned int)pageOffset);

src/SocketRx.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ void SocketRx::run() {
195195
*/
196196
}
197197

198+
#ifndef MSG_NOSIGNAL
199+
#define MSG_NOSIGNAL 0
200+
#endif
201+
198202
void SocketRx::broadcast(const char *message) {
199203
if (message==nullptr) return;
200204
ssize_t l = strlen(message);

0 commit comments

Comments
 (0)