]> git.ozlabs.org Git - ccan/commit
fdpass: fix complilation on FreeBSD. master
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 13 Jun 2025 02:13:20 +0000 (11:43 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 13 Jun 2025 02:13:20 +0000 (11:43 +0930)
commitca0940392e3cf17a0537d66ee6db3a4931cd3821
tree9c9d8193ec8e3b95b1f9e748e82ec5caefcb6027
parent734087370994b06caf4b91eb4027e039e15dd77a
fdpass: fix complilation on FreeBSD.

```
cc ccan/ccan/fdpass/fdpass.c
ccan/ccan/fdpass/fdpass.c:16:12: error: use of undeclared identifier 'u_long'; did you mean 'long'?
                char buf[CMSG_SPACE(sizeof(fd))];
                         ^
/usr/include/sys/socket.h:577:25: note: expanded from macro 'CMSG_SPACE'
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:16:12: error: use of undeclared identifier 'u_long'
/usr/include/sys/socket.h:577:25: note: expanded from macro 'CMSG_SPACE'
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:16:12: error: use of undeclared identifier 'u_long'; did you mean 'long'?
/usr/include/sys/socket.h:577:58: note: expanded from macro 'CMSG_SPACE'
                                                                  ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:16:12: error: use of undeclared identifier 'u_long'
/usr/include/sys/socket.h:577:58: note: expanded from macro 'CMSG_SPACE'
                                                                  ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:26:19: error: use of undeclared identifier 'u_long'; did you mean 'long'?
        cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
                         ^
/usr/include/sys/socket.h:578:23: note: expanded from macro 'CMSG_LEN'
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:26:19: error: use of undeclared identifier 'u_long'
        cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
                         ^
/usr/include/sys/socket.h:578:23: note: expanded from macro 'CMSG_LEN'
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:26:19: error: use of undeclared identifier 'u_long'
/usr/include/sys/socket.h:578:23: note: expanded from macro 'CMSG_LEN'
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:27:9: error: use of undeclared identifier 'u_long'; did you mean 'long'?
        memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd));
               ^
/usr/include/sys/socket.h:554:6: note: expanded from macro 'CMSG_DATA'
                                 _ALIGN(sizeof(struct cmsghdr)))
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:27:9: error: use of undeclared identifier 'u_long'
/usr/include/sys/socket.h:554:6: note: expanded from macro 'CMSG_DATA'
                                 _ALIGN(sizeof(struct cmsghdr)))
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:53:12: error: use of undeclared identifier 'u_long'; did you mean 'long'?
                char buf[CMSG_SPACE(sizeof(fd))];
                         ^
/usr/include/sys/socket.h:577:25: note: expanded from macro 'CMSG_SPACE'
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:53:12: error: use of undeclared identifier 'u_long'
/usr/include/sys/socket.h:577:25: note: expanded from macro 'CMSG_SPACE'
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:53:12: error: use of undeclared identifier 'u_long'; did you mean 'long'?
/usr/include/sys/socket.h:577:58: note: expanded from macro 'CMSG_SPACE'
                                                                  ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:74:27: error: use of undeclared identifier 'u_long'; did you mean 'long'?
            || cmsg->cmsg_len != CMSG_LEN(sizeof(fd))
                                 ^
/usr/include/sys/socket.h:578:23: note: expanded from macro 'CMSG_LEN'
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:74:27: error: use of undeclared identifier 'u_long'
/usr/include/sys/socket.h:578:23: note: expanded from macro 'CMSG_LEN'
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:81:14: error: use of undeclared identifier 'u_long'; did you mean 'long'?
        memcpy(&fd, CMSG_DATA(cmsg), sizeof(fd));
                    ^
/usr/include/sys/socket.h:554:6: note: expanded from macro 'CMSG_DATA'
                                 _ALIGN(sizeof(struct cmsghdr)))
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
ccan/ccan/fdpass/fdpass.c:81:14: error: use of undeclared identifier 'u_long'
/usr/include/sys/socket.h:554:6: note: expanded from macro 'CMSG_DATA'
                                 _ALIGN(sizeof(struct cmsghdr)))
                                 ^
/usr/include/machine/_align.h:45:22: note: expanded from macro '_ALIGN'
                           ^
16 errors generated.
gmake: *** [Makefile:994: ccan-fdpass.o] Error 1
```

Reported-by: https://github.com/21M4TW
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/fdpass/fdpass.c