]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10515 slapo-auditlog: no O_NONBLOCK on Windows
authorHoward Chu <hyc@openldap.org>
Mon, 1 Jun 2026 14:24:35 +0000 (15:24 +0100)
committerHoward Chu <hyc@openldap.org>
Mon, 1 Jun 2026 14:24:35 +0000 (15:24 +0100)
Must #ifdef the use of O_NONBLOCK

servers/slapd/overlays/auditlog.c

index 49a8e83675c3ad77a2b3274ab74b724e7d8da19d..d4b6e0949410d2fdad2ad5035aca86942cf80dfa 100644 (file)
@@ -134,9 +134,11 @@ static int auditlog_response(Operation *op, SlapReply *rs) {
 
        /* Open file with optional non-blocking mode */
        flags = O_WRONLY | O_CREAT | O_APPEND;
+#ifdef O_NONBLOCK
        if ( ad->ad_nonblocking ) {
                flags |= O_NONBLOCK;
        }
+#endif
 
        fd = open(ad->ad_logfile, flags, 0666);
        if ( fd == -1 ) goto done;