Fix use of deprecated glib on core
diff --git a/src/rfkill.c b/src/rfkill.c
index 75397b8..b40c6e7 100644
--- a/src/rfkill.c
+++ b/src/rfkill.c
@@ -71,18 +71,19 @@
 	struct rfkill_event *event = (void *) buf;
 	struct btd_adapter *adapter;
 	char sysname[PATH_MAX];
-	gsize len;
-	GIOError err;
+	ssize_t len;
 	int fd, id;
 
 	if (cond & (G_IO_NVAL | G_IO_HUP | G_IO_ERR))
 		return FALSE;
 
+	fd = g_io_channel_unix_get_fd(chan);
+
 	memset(buf, 0, sizeof(buf));
 
-	err = g_io_channel_read(chan, (gchar *) buf, sizeof(buf), &len);
-	if (err) {
-		if (err == G_IO_ERROR_AGAIN)
+	len = read(fd, buf, sizeof(buf));
+	if (len < 0) {
+		if (errno == EAGAIN)
 			return TRUE;
 		return FALSE;
 	}
diff --git a/src/storage.c b/src/storage.c
index fb6e401..1c6ced4 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -1265,7 +1265,7 @@
 	const char *address = match->pattern;
 
 	/* Each key contains: MAC#handle*/
-	if (g_strncasecmp(key, address, 17) == 0)
+	if (strncasecmp(key, address, 17) == 0)
 		match->keys = g_slist_append(match->keys, g_strdup(key));
 }