002-dont-use-isfdtype.patch (607B)
1 Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed 2 since released versions of uClibc don't support isfdtype(). 3 4 Signed-off-by: Gustavo Zaarias <gustavo@zacarias.com.ar> 5 6 Index: acpid-2.0.23/sock.c 7 =================================================================== 8 --- acpid-2.0.23.orig/sock.c 9 +++ acpid-2.0.23/sock.c 10 @@ -53,7 +53,10 @@ int non_root_clients; 11 int 12 is_socket(int fd) 13 { 14 - return (isfdtype(fd, S_IFSOCK) == 1); 15 + int v; 16 + socklen_t l = sizeof(int); 17 + 18 + return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); 19 } 20 21 /* accept a new client connection */