Skip to content

Commit c19e323

Browse files
GillesDuvertGiloo
andauthored
solve #1967 compile problem for FreeBSD ??? (#1977)
Co-authored-by: Giloo <gildas@localhost>
1 parent 9b47787 commit c19e323

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gdl2gdl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ messageBoxHandle StartIndividualClientMessageChannel(std::string & name){
436436

437437
name=G2G_SERVER_QUEUE_BASENAME+i2s(getpid())+"_"+i2s(++ClientSessionNumber);
438438
messageBoxHandle h;
439-
if ((h = mq_open(name.c_str(), O_RDONLY | O_CREAT, QUEUE_PERMISSIONS, &attr)) == -1) {
439+
if ((h = mq_open(name.c_str(), O_RDONLY | O_CREAT, QUEUE_PERMISSIONS, &attr)) == (messageBoxHandle)-1) {
440440
throw GDLException("Server: mq_open (client) :"+string(strerror(errno)));
441441
}
442442
return h;
@@ -447,7 +447,7 @@ void gdl_ipc_ClientClosesMailBox(){
447447
}
448448
void gdl_ipc_ClientGetsMailboxAddress(std::string & s) {
449449
g2gClientMailbox=s;
450-
if ((gdl2gdlMessageBoxHandle = mq_open(g2gClientMailbox.c_str(), O_WRONLY)) == -1) {
450+
if ((gdl2gdlMessageBoxHandle = mq_open(g2gClientMailbox.c_str(), O_WRONLY)) == (messageBoxHandle)-1) {
451451
throw GDLException("Server: mq_open (server) :"+string(strerror(errno)));
452452
}
453453
//here is a good point to start to be absolutely silent

0 commit comments

Comments
 (0)