diff -Naur udev-182/src/sd-daemon.c udev-182.patched/src/sd-daemon.c
--- udev-182/src/sd-daemon.c	2012-02-14 06:44:10.000000000 -0700
+++ udev-182.patched/src/sd-daemon.c	2014-02-09 18:22:50.000000000 -0700
@@ -75,7 +75,8 @@
         char *p = NULL;
         unsigned long l;
 
-        if (!(e = getenv("LISTEN_PID"))) {
+        e = getenv("LISTEN_PID");
+        if (!e) {
                 r = 0;
                 goto finish;
         }
@@ -88,7 +89,7 @@
                 goto finish;
         }
 
-        if (!p || *p || l <= 0) {
+        if (!p || p == e || *p || l <= 0) {
                 r = -EINVAL;
                 goto finish;
         }
@@ -99,7 +100,8 @@
                 goto finish;
         }
 
-        if (!(e = getenv("LISTEN_FDS"))) {
+        e = getenv("LISTEN_FDS");
+        if (!e) {
                 r = 0;
                 goto finish;
         }
@@ -112,7 +114,7 @@
                 goto finish;
         }
 
-        if (!p || *p) {
+        if (!p || p == e || *p) {
                 r = -EINVAL;
                 goto finish;
         }
@@ -120,7 +122,8 @@
         for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int) l; fd ++) {
                 int flags;
 
-                if ((flags = fcntl(fd, F_GETFD)) < 0) {
+                flags = fcntl(fd, F_GETFD);
+                if (flags < 0) {
                         r = -errno;
                         goto finish;
                 }
@@ -152,7 +155,6 @@
         if (fd < 0)
                 return -EINVAL;
 
-        memset(&st_fd, 0, sizeof(st_fd));
         if (fstat(fd, &st_fd) < 0)
                 return -errno;
 
@@ -162,7 +164,6 @@
         if (path) {
                 struct stat st_path;
 
-                memset(&st_path, 0, sizeof(st_path));
                 if (stat(path, &st_path) < 0) {
 
                         if (errno == ENOENT || errno == ENOTDIR)
@@ -272,7 +273,8 @@
         if (family < 0)
                 return -EINVAL;
 
-        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
+        r = sd_is_socket_internal(fd, type, listening);
+        if (r <= 0)
                 return r;
 
         if (family > 0) {
@@ -302,7 +304,8 @@
         if (family != 0 && family != AF_INET && family != AF_INET6)
                 return -EINVAL;
 
-        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
+        r = sd_is_socket_internal(fd, type, listening);
+        if (r <= 0)
                 return r;
 
         memset(&sockaddr, 0, sizeof(sockaddr));
@@ -344,7 +347,8 @@
         socklen_t l;
         int r;
 
-        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
+        r = sd_is_socket_internal(fd, type, listening);
+        if (r <= 0)
                 return r;
 
         memset(&sockaddr, 0, sizeof(sockaddr));
@@ -382,42 +386,42 @@
         return 1;
 }
 
-_sd_export_ int sd_is_mq(int fd, const char *path) {
-#if !defined(__linux__)
-        return 0;
-#else
-        struct mq_attr attr;
-
-        if (fd < 0)
-                return -EINVAL;
-
-        if (mq_getattr(fd, &attr) < 0)
-                return -errno;
-
-        if (path) {
-                char fpath[PATH_MAX];
-                struct stat a, b;
-
-                if (path[0] != '/')
-                        return -EINVAL;
-
-                if (fstat(fd, &a) < 0)
-                        return -errno;
-
-                strncpy(stpcpy(fpath, "/dev/mqueue"), path, sizeof(fpath) - 12);
-                fpath[sizeof(fpath)-1] = 0;
-
-                if (stat(fpath, &b) < 0)
-                        return -errno;
-
-                if (a.st_dev != b.st_dev ||
-                    a.st_ino != b.st_ino)
-                        return 0;
-        }
-
-        return 1;
-#endif
-}
+//_sd_export_ int sd_is_mq(int fd, const char *path) {
+//#if !defined(__linux__)
+//        return 0;
+//#else
+//        struct mq_attr attr;
+//
+//        if (fd < 0)
+//                return -EINVAL;
+//
+//        if (mq_getattr(fd, &attr) < 0)
+//                return -errno;
+//
+//        if (path) {
+//                char fpath[PATH_MAX];
+//                struct stat a, b;
+//
+//                if (path[0] != '/')
+//                        return -EINVAL;
+//
+//                if (fstat(fd, &a) < 0)
+//                        return -errno;
+//
+//                strncpy(stpcpy(fpath, "/dev/mqueue"), path, sizeof(fpath) - 12);
+//                fpath[sizeof(fpath)-1] = 0;
+//
+//                if (stat(fpath, &b) < 0)
+//                        return -errno;
+//
+//                if (a.st_dev != b.st_dev ||
+//                    a.st_ino != b.st_ino)
+//                        return 0;
+//        }
+//
+//        return 1;
+//#endif
+//}
 
 _sd_export_ int sd_notify(int unset_environment, const char *state) {
 #if defined(DISABLE_SYSTEMD) || !defined(__linux__) || !defined(SOCK_CLOEXEC)
@@ -434,7 +438,8 @@
                 goto finish;
         }
 
-        if (!(e = getenv("NOTIFY_SOCKET")))
+        e = getenv("NOTIFY_SOCKET");
+        if (!e)
                 return 0;
 
         /* Must be an abstract socket, or an absolute path */
@@ -443,7 +448,8 @@
                 goto finish;
         }
 
-        if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) {
+        fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0);
+        if (fd < 0) {
                 r = -errno;
                 goto finish;
         }
diff -Naur udev-182/src/sd-daemon.h udev-182.patched/src/sd-daemon.h
--- udev-182/src/sd-daemon.h	2012-02-14 06:44:19.000000000 -0700
+++ udev-182.patched/src/sd-daemon.h	2014-02-09 18:21:47.000000000 -0700
@@ -59,12 +59,12 @@
   You may find an up-to-date version of these source files online:
 
   http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h
-  http://cgit.freedesktop.org/systemd/systemd/plain/src/sd-daemon.c
+  http://cgit.freedesktop.org/systemd/systemd/plain/src/libsystemd-daemon/sd-daemon.c
 
   This should compile on non-Linux systems, too, but with the
   exception of the sd_is_xxx() calls all functions will become NOPs.
 
-  See sd-daemon(7) for more information.
+  See sd-daemon(3) for more information.
 */
 
 #ifndef _sd_printf_attr_
@@ -187,7 +187,7 @@
   0 otherwise. If path is NULL a message queue name check is not
   done. Returns a negative errno style error code on failure.
 */
-int sd_is_mq(int fd, const char *path);
+//int sd_is_mq(int fd, const char *path);
 
 /*
   Informs systemd about changed daemon state. This takes a number of
