diff --color -rupN old/configure.ac new/configure.ac
--- old/configure.ac	2017-04-20 05:08:17.000000000 +0800
+++ new/configure.ac	2021-08-05 15:44:25.903382323 +0800
@@ -49,7 +49,7 @@ AC_CHECK_HEADERS(
 AC_CHECK_HEADERS(
         [mtd/mtd-user.h],
         [],
-        [AC_MSG_ERROR([*** KERNEL header not found])]
+        [AC_MSG_WARN([*** KERNEL header not found])]
 )
 
 AC_CHECK_HEADERS(
@@ -66,7 +66,7 @@ AC_TYPE_PID_T
 AC_CHECK_MEMBERS([struct stat.st_rdev])
 AC_CHECK_DECLS([getrandom, gettid, name_to_handle_at, accept4, mkostemp, ppoll, strndupa], [], [],
 [[#include <fcntl.h>
-#include <linux/random.h>
+#include <sys/random.h>
 #include <poll.h>
 #include <signal.h>
 #include <stdlib.h>
@@ -241,7 +241,7 @@ AC_CHECK_DECL([unshare],
         [AC_DEFINE(HAVE_UNSHARE, 1, [Define if unshare is declared])],
         [AC_CHECK_DECL([SYS_unshare],
                 [ ] ,
-                [AC_MSG_ERROR([*** unshare nor SYS_unshare found.])],
+                [AC_MSG_WARN([*** unshare nor SYS_unshare found.])],
                 [#include <syscall.h>])],
         [#include <sched.h>])
 
diff --color -rupN old/Makefile.am new/Makefile.am
--- old/Makefile.am	2017-01-02 07:19:58.000000000 +0800
+++ new/Makefile.am	2021-08-05 15:44:25.903382323 +0800
@@ -5,8 +5,7 @@ SUBDIRS = \
 
 if ENABLE_PROGRAMS
 SUBDIRS += \
-	rules \
-	test
+	rules 
 endif
 
 if ENABLE_MANPAGES
diff --color -rupN old/src/ata_id/ata_id.c new/src/ata_id/ata_id.c
--- old/src/ata_id/ata_id.c	2016-11-18 05:14:19.000000000 +0800
+++ new/src/ata_id/ata_id.c	2021-08-05 15:44:25.903382323 +0800
@@ -44,6 +44,7 @@
 #include <linux/cdrom.h>
 #include <linux/bsg.h>
 #include <arpa/inet.h>
+#include <endian.h>
 
 #include "libudev.h"
 #include "libudev-private.h"
diff --color -rupN old/src/shared/hashmap.c new/src/shared/hashmap.c
--- old/src/shared/hashmap.c	2016-11-18 05:14:19.000000000 +0800
+++ new/src/shared/hashmap.c	2021-08-05 15:44:25.903382323 +0800
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#include <limits.h>
 
 #include "util.h"
 #include "hashmap.h"
diff --color -rupN old/src/shared/hashmap.h new/src/shared/hashmap.h
--- old/src/shared/hashmap.h	2016-11-18 05:14:19.000000000 +0800
+++ new/src/shared/hashmap.h	2021-08-05 15:44:25.903382323 +0800
@@ -98,10 +98,7 @@ extern const struct hash_ops uint64_hash
 #if SIZEOF_DEV_T != 8
 unsigned long devt_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) _pure_;
 int devt_compare_func(const void *a, const void *b) _pure_;
-extern const struct hash_ops devt_hash_ops = {
-        .hash = devt_hash_func,
-        .compare = devt_compare_func
-};
+extern const struct hash_ops devt_hash_ops;
 #else
 #define devt_hash_func uint64_hash_func
 #define devt_compare_func uint64_compare_func
diff --color -rupN old/src/shared/missing.h new/src/shared/missing.h
--- old/src/shared/missing.h	2017-01-02 07:18:51.000000000 +0800
+++ new/src/shared/missing.h	2021-08-05 15:45:09.583035624 +0800
@@ -21,12 +21,15 @@
 
 /* Missing glibc definitions to access certain kernel APIs */
 
+#include "config.h"
+
 #include <sys/resource.h>
+#if !HAVE_DECL_GETRANDOM || !HAVE_DECL_GETTID || !HAVE_DECL_NAME_TO_HANDLE_AT
 #include <sys/syscall.h>
+#endif
 #include <fcntl.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <linux/oom.h>
 
 #include "macro.h"
 #include "config.h"
@@ -129,7 +132,7 @@ static inline pid_t gettid(void) {
 #  elif defined(__powerpc__)
 #    define __NR_name_to_handle_at 345
 #  else
-#    error "__NR_name_to_handle_at is not defined"
+#    warning "__NR_name_to_handle_at is not defined"
 #  endif
 #endif
 
diff --color -rupN old/src/shared/random-util.c new/src/shared/random-util.c
--- old/src/shared/random-util.c	2016-11-18 05:14:19.000000000 +0800
+++ new/src/shared/random-util.c	2021-08-05 15:44:25.903382323 +0800
@@ -23,7 +23,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <time.h>
-#include <linux/random.h>
+#include <sys/random.h>
 
 #include "random-util.h"
 #include "time-util.h"
diff --color -rupN old/src/shared/socket-util.h new/src/shared/socket-util.h
--- old/src/shared/socket-util.h	2016-11-18 05:14:19.000000000 +0800
+++ new/src/shared/socket-util.h	2021-08-05 15:44:25.903382323 +0800
@@ -23,14 +23,10 @@
 #include <net/if.h>
 #include <asm/types.h>
 #include <linux/netlink.h>
-#include <linux/if_packet.h>
 
 union sockaddr_union {
         struct sockaddr sa;
         struct sockaddr_in in;
-        struct sockaddr_in6 in6;
         struct sockaddr_un un;
         struct sockaddr_nl nl;
-        struct sockaddr_storage storage;
-        struct sockaddr_ll ll;
 };
diff --color -rupN old/src/shared/terminal-util.c new/src/shared/terminal-util.c
--- old/src/shared/terminal-util.c	2016-11-18 05:14:19.000000000 +0800
+++ new/src/shared/terminal-util.c	2021-08-05 15:44:25.903382323 +0800
@@ -27,9 +27,6 @@
 #include <time.h>
 #include <assert.h>
 #include <poll.h>
-#include <linux/vt.h>
-#include <linux/tiocl.h>
-#include <linux/kd.h>
 
 #include "terminal-util.h"
 #include "time-util.h"
diff --color -rupN old/src/shared/time-util.c new/src/shared/time-util.c
--- old/src/shared/time-util.c	2016-11-18 05:14:19.000000000 +0800
+++ new/src/shared/time-util.c	2021-08-05 15:44:25.903382323 +0800
@@ -21,7 +21,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdbool.h>
-#include <time.h>
+#include <sys/time.h>
 
 #include "time-util.h"
 #include "macro.h"
diff --color -rupN old/src/shared/util.c new/src/shared/util.c
--- old/src/shared/util.c	2016-11-18 05:14:19.000000000 +0800
+++ new/src/shared/util.c	2021-08-05 15:44:25.903382323 +0800
@@ -27,7 +27,7 @@
 #include <syslog.h>
 #include <sched.h>
 #include <sys/resource.h>
-#include <linux/sched.h>
+#include <lyos/sched.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -40,7 +40,6 @@
 #include <sys/utsname.h>
 #include <pwd.h>
 #include <netinet/ip.h>
-#include <linux/kd.h>
 #include <dlfcn.h>
 #include <sys/wait.h>
 #include <sys/time.h>
diff --color -rupN old/src/shared/util.h new/src/shared/util.h
--- old/src/shared/util.h	2016-11-18 05:14:19.000000000 +0800
+++ new/src/shared/util.h	2021-08-05 15:45:27.696225141 +0800
@@ -32,6 +32,7 @@
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/inotify.h>
+#include <limits.h>
 
 #include "time-util.h"
 #include "missing.h"
diff --color -rupN old/src/udev/udev-builtin-input_id.c new/src/udev/udev-builtin-input_id.c
--- old/src/udev/udev-builtin-input_id.c	2017-01-02 07:18:51.000000000 +0800
+++ new/src/udev/udev-builtin-input_id.c	2021-08-05 15:44:25.906715630 +0800
@@ -27,7 +27,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
-#include <linux/limits.h>
+#include <sys/syslimits.h>
 #include <linux/input.h>
 
 #include "udev.h"
diff --color -rupN old/src/udev/udev-builtin-keyboard.c new/src/udev/udev-builtin-keyboard.c
--- old/src/udev/udev-builtin-keyboard.c	2017-01-06 05:05:38.000000000 +0800
+++ new/src/udev/udev-builtin-keyboard.c	2021-08-05 15:44:25.906715630 +0800
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
-#include <linux/limits.h>
+#include <sys/syslimits.h>
 #include <linux/input.h>
 
 #include "udev.h"
diff --color -rupN old/src/udev/udevd.c new/src/udev/udevd.c
--- old/src/udev/udevd.c	2016-11-18 05:14:19.000000000 +0800
+++ new/src/udev/udevd.c	2021-08-05 15:44:25.906715630 +0800
@@ -28,6 +28,7 @@
 #include <string.h>
 #include <ctype.h>
 #include <fcntl.h>
+#include <linux/fs.h>
 #include <time.h>
 #include <getopt.h>
 #include <dirent.h>
@@ -45,6 +46,7 @@
 #include <sys/ioctl.h>
 #include <sys/inotify.h>
 #include <sys/utsname.h>
+#include <limits.h>
 
 #include "udev.h"
 #include "udev-util.h"
@@ -126,6 +128,7 @@ struct worker {
 
 /* passed from worker to main process */
 struct worker_message {
+    int i;
 };
 
 static void event_free(struct event *event) {
@@ -215,6 +218,7 @@ static void worker_attach_event(struct w
 
 static int worker_send_message(int fd) {
         struct worker_message message = {};
+        message.i = 1;
 
         return loop_write(fd, &message, sizeof(message), false);
 }
@@ -1323,7 +1327,7 @@ int main(int argc, char *argv[]) {
         }
 
         /* unnamed socket from workers to the main daemon */
-        if (socketpair(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0, worker_watch) < 0) {
+        if (socketpair(AF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0, worker_watch) < 0) {
                 r = log_error_errno(errno, "error creating socketpair");
                 goto exit;
         }
