python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / acpid / 0001-dont-use-isfdtype.patch
blob2fe6c2183bd5dc31fad29bf059cc62116fe0c2be
1 Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed
2 since released versions of uClibc don't support isfdtype().
4 Signed-off-by: Gustavo Zaarias <gustavo@zacarias.com.ar>
6 diff -Nura acpid-2.0.22.orig/sock.c acpid-2.0.22/sock.c
7 --- acpid-2.0.22.orig/sock.c 2014-04-22 18:04:19.706841764 -0300
8 +++ acpid-2.0.22/sock.c 2014-04-22 18:05:08.285479625 -0300
9 @@ -53,7 +53,10 @@
10 int
11 is_socket(int fd)
13 - return (isfdtype(fd, S_IFSOCK) == 1);
14 + int v;
15 + socklen_t l = sizeof(int);
17 + return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
20 /* accept a new client connection */