Skip to content

Commit 7f96ccd

Browse files
authored
[maintenance]: bool is a keyword in newer C versions, cannot be a parameter (#6459)
This would eventually lead to compilation errors with newer versions of GCC, best fix it now by renaming the parameter.
2 parents 18e8584 + 61f79d2 commit 7f96ccd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ocaml/libs/xapi-stdext/lib/xapi-stdext-unix/unixext_stubs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
#include "blkgetsize.h"
4040

4141
/* Set the TCP_NODELAY flag on a Unix.file_descr */
42-
CAMLprim value stub_unixext_set_tcp_nodelay (value fd, value bool)
42+
CAMLprim value stub_unixext_set_tcp_nodelay (value fd, value nodelay)
4343
{
44-
CAMLparam2 (fd, bool);
44+
CAMLparam2 (fd, nodelay);
4545
int c_fd = Int_val(fd);
46-
int opt = (Bool_val(bool)) ? 1 : 0;
46+
int opt = (Bool_val(nodelay)) ? 1 : 0;
4747
if (setsockopt(c_fd, IPPROTO_TCP, TCP_NODELAY, (void *)&opt, sizeof(opt)) != 0){
4848
uerror("setsockopt", Nothing);
4949
}

0 commit comments

Comments
 (0)