gcc-4.5.4 on NetBSD complains:
xdm/prngc.c: In function ‘get_prngd_bytes’:
xdm/prngc.c:133:2: error: passing argument 1 of ‘atomicio’ from incompatible 
pointer type
xdm/prngc.c:46:16: note: expected ‘ssize_t (*)(int,  void *, size_t)’ but 
argument is of type ‘ssize_t (*)(int,  const void *, size_t)’

The problem is that the read(2) and write(2) syscalls differ
in the const-ness of their second argument.

Signed-off-by: Thomas Klausner <w...@netbsd.org>
---
 xdm/prngc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdm/prngc.c b/xdm/prngc.c
index f0db8eb..fe737e3 100644
--- a/xdm/prngc.c
+++ b/xdm/prngc.c
@@ -130,7 +130,7 @@ reopen:
        msg[0] = 0x02;
        msg[1] = len;
 
-       if (atomicio(write, fd, msg, sizeof(msg)) != sizeof(msg)) {
+       if (atomicio((ssize_t (*)(int, void *, size_t))write, fd, msg, 
sizeof(msg)) != sizeof(msg)) {
                if (errno == EPIPE && errors < 10) {
                        close(fd);
                        errors++;
-- 
1.8.3.1

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to