chiark / gitweb /
udev: fix segfault with android rndis
[elogind.git] / src / udev / udev-builtin-net_id.c
index 57674bf2785b51c5f96a39eaa8939f514e5d2161..fdbec5ae916872b7ba380355493f850cf41091b4 100644 (file)
@@ -91,6 +91,7 @@
 #include <linux/pci_regs.h>
 
 #include "udev.h"
+#include "fileio.h"
 
 enum netname_type{
         NET_UNDEF,
@@ -255,7 +256,7 @@ static int names_pci(struct udev_device *dev, struct netnames *names) {
         if (!parent)
                 return -ENOENT;
         /* check if our direct parent is a PCI device with no other bus in-between */
-        if (streq("pci", udev_device_get_subsystem(parent))) {
+        if (streq_ptr("pci", udev_device_get_subsystem(parent))) {
                 names->type = NET_PCI;
                 names->pcidev = parent;
         } else {