Fix -Wcast-qual warnings
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Fri, 1 Oct 2021 09:00:32 +0000 (10:00 +0100)
committerAndreas Schneider <asn@samba.org>
Thu, 8 Sep 2022 09:48:52 +0000 (11:48 +0200)
commitf5c3e25c9910d305a26f267fcfa0bfe8d97834ec
tree2f44d4a4d05f053f1123b719dbf55beeccd68267
parentcdc071a1e7438143c6c75af123821b8672d05b8c
Fix -Wcast-qual warnings

Without this change I get the following -Werror build failure when building
samba on macOS:
```
../../third_party/socket_wrapper/socket_wrapper.c:5420:15: error: cast from 'const struct cmsghdr *' to 'unsigned char *' drops const qualifier [-Werror,-Wcast-qual]
        __fds_in.p = CMSG_DATA(cmsg);
                     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:631:51: note: expanded from macro 'CMSG_DATA'
#define CMSG_DATA(cmsg)         ((unsigned char *)(cmsg) + \
                                                  ^
```

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
CompilerChecks.cmake
src/socket_wrapper.c