You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
607 B

Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed
since released versions of uClibc don't support isfdtype().
Signed-off-by: Gustavo Zaarias <gustavo@zacarias.com.ar>
Index: acpid-2.0.23/sock.c
===================================================================
--- acpid-2.0.23.orig/sock.c
+++ acpid-2.0.23/sock.c
@@ -53,7 +53,10 @@ int non_root_clients;
int
is_socket(int fd)
{
- return (isfdtype(fd, S_IFSOCK) == 1);
+ int v;
+ socklen_t l = sizeof(int);
+
+ return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
}
/* accept a new client connection */