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.
gentoo-overlay/xfce-extra/xfce4-wavelan-plugin/files/xfce4-wavelan-plugin-0.6.2-...

56 lines
1.5 KiB

https://gitlab.xfce.org/panel-plugins/xfce4-wavelan-plugin/-/merge_requests/4
https://bugs.gentoo.org/799827
From: Olaf Hering <olaf@aepfle.de>
Date: Fri, 25 Jun 2021 19:37:09 +0200
Subject: [PATCH] remove bogus close function
Just close the file descriptor, instead of doing shutdown.
Not doing so was already wrong in 2006.
wi_linux.c:83:1: error: conflicting types for 'close'
close(int fd)
^~~~~
In file included from /usr/include/glib-2.0/gio/gcredentials.h:32:0,
from /usr/include/glib-2.0/gio/gio.h:46,
from /usr/include/xfce4/libxfce4util/xfce-gio-extensions.h:28,
from /usr/include/xfce4/libxfce4util/libxfce4util.h:40,
from wi_linux.c:32:
/usr/include/unistd.h:353:12: note: previous declaration of 'close' was here
extern int close (int __fd);
^~~~~
make[2]: *** [Makefile:525: libwavelan_la-wi_linux.lo] Error 1
make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/xfce4-wavelan-plugin-20210505T194034.7ba466b/panel-plugin'
Signed-off-by: Olaf Hering <olaf@aepfle.de>
--- a/panel-plugin/wi_linux.c
+++ b/panel-plugin/wi_linux.c
@@ -31,6 +31,7 @@
#include <libxfce4util/libxfce4util.h>
+#include <unistd.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -79,17 +80,9 @@ wi_open(const char *interface)
return(device);
}
-static void
-close(int fd)
-{
- shutdown(fd, SHUT_RDWR);
-}
-
void
wi_close(struct wi_device *device)
{
- g_return_if_fail(device != NULL);
-
close(device->socket);
g_free(device);
}
GitLab