Changeset: 97a7a6a5766b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/97a7a6a5766b
Modified Files:
monetdb5/modules/mal/mal_mapi.c
Branch: Aug2024
Log Message:
Work around problem that MSG_CMSG_CLOEXEC is defined as itself.
diffs (27 lines):
diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -403,10 +403,11 @@ SERVERlistenThread(SOCKET *Sock)
msgh.msg_control = ccmsg;
msgh.msg_controllen = sizeof(ccmsg);
-#ifndef MSG_CMSG_CLOEXEC
-#define MSG_CMSG_CLOEXEC 0
+#ifdef MSG_CMSG_CLOEXEC
+ rv = recvmsg(msgsock, &msgh, MSG_CMSG_CLOEXEC);
+#else
+ rv = recvmsg(msgsock, &msgh, 0);
#endif
- rv = recvmsg(msgsock, &msgh, MSG_CMSG_CLOEXEC);
if (rv == -1) {
closesocket(msgsock);
continue;
@@ -434,7 +435,7 @@ SERVERlistenThread(SOCKET *Sock)
*/
c_d = (int *) CMSG_DATA(cmsg);
msgsock = *c_d;
-#if MSG_CMSG_CLOEXEC == 0 && defined(HAVE_FCNTL)
+#if !defined(MSG_CMSG_CLOEXEC) && defined(HAVE_FCNTL)
(void) fcntl(msgsock, F_SETFD, FD_CLOEXEC);
#endif
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]