diff -Paur --no-dereference -- xorriso.upstream/config.sub xorriso/config.sub
--- xorriso.upstream/config.sub
+++ xorriso/config.sub
@@ -1353,7 +1353,7 @@
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
 	      | -sym* | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* \
+	      | -aos* | -aros* | -sortix* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff -Paur --no-dereference -- xorriso.upstream/libburn/async.c xorriso/libburn/async.c
--- xorriso.upstream/libburn/async.c
+++ xorriso/libburn/async.c
@@ -37,6 +37,7 @@
 #include "init.h"
 #include "back_hacks.h"
 
+#include <errno.h>
 #include <pthread.h>
 #include <sys/types.h>
 #include <unistd.h>
diff -Paur --no-dereference -- xorriso.upstream/libisofs/rockridge.h xorriso/libisofs/rockridge.h
--- xorriso.upstream/libisofs/rockridge.h
+++ xorriso/libisofs/rockridge.h
@@ -39,6 +39,9 @@
 #ifndef LIBISO_ROCKRIDGE_H
 #define LIBISO_ROCKRIDGE_H
 
+/* PATCH: Get ssize_t. */
+#include <sys/types.h>
+
 #include "ecma119.h"
 
 
diff -Paur --no-dereference -- xorriso.upstream/libjte/checksum.c xorriso/libjte/checksum.c
--- xorriso.upstream/libjte/checksum.c
+++ xorriso/libjte/checksum.c
@@ -328,7 +328,9 @@
         if (a->thread)
         {
             void *ret;
+#if !defined(__sortix__) || defined(__SORTIX_HAS_PTHREAD_CANCEL__)
             pthread_cancel(a->thread);
+#endif
             pthread_join(a->thread, &ret);
             a->thread = 0;
         }
diff -Paur --no-dereference -- xorriso.upstream/xorriso/misc_funct.c xorriso/xorriso/misc_funct.c
--- xorriso.upstream/xorriso/misc_funct.c
+++ xorriso/xorriso/misc_funct.c
@@ -22,6 +22,7 @@
 #include <sys/time.h>
 #include <time.h>
 #include <sys/utsname.h>
+#include <sys/select.h>
 
 
 #include "sfile.h"
diff -Paur --no-dereference -- xorriso.upstream/xorriso/parse_exec.c xorriso/xorriso/parse_exec.c
--- xorriso.upstream/xorriso/parse_exec.c
+++ xorriso/xorriso/parse_exec.c
@@ -2988,7 +2988,7 @@
 
  Xorriso_alloc_meM(prog, char, 5 * SfileadrL);
 
- wait3(NULL,WNOHANG,NULL); /* just to remove any old dead child */
+ waitpid(-1, NULL, WNOHANG); /* just to remove any old dead child */
 
  if(flag & 2) {
    ret= Xorriso_make_argv_with_null(xorriso, in_argc, in_argv,
diff -Paur --no-dereference -- xorriso.upstream/xorriso/read_run.c xorriso/xorriso/read_run.c
--- xorriso.upstream/xorriso/read_run.c
+++ xorriso/xorriso/read_run.c
@@ -1139,7 +1139,11 @@
      Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0);
      ret= 0; goto ex;
    }
+#if defined(__sortix__) && !defined(__SORTIX_HAS_MKNOD__)
+   ret= (errno = ENOSYS, -1);
+#else
    ret= mknod(disk_path, mode, dev);
+#endif
    l_errno= errno;
 
  } else if(LIBISO_ISBLK(node)) {
@@ -1152,13 +1156,21 @@
      goto ex;
    if(dev == (dev_t) 1)
      goto probably_damaged;
+#if defined(__sortix__) && !defined(__SORTIX_HAS_MKNOD__)
+   ret= (errno = ENOSYS, -1);
+#else
    ret= mknod(disk_path, mode, dev);
+#endif
    l_errno= errno;
 
  } else if(LIBISO_ISFIFO(node)) {
    what= "named pipe";
    mode= S_IFIFO | 0777;
+#if defined(__sortix__) && !defined(__SORTIX_HAS_MKNOD__)
+   ret= (errno = ENOSYS, -1);
+#else
    ret= mknod(disk_path, mode, dev);
+#endif
    l_errno= errno;
 
  } else if(LIBISO_ISSOCK(node)) {
diff -Paur --no-dereference -- xorriso.upstream/xorriso/text_io.c xorriso/xorriso/text_io.c
--- xorriso.upstream/xorriso/text_io.c
+++ xorriso/xorriso/text_io.c
@@ -4397,8 +4397,12 @@
        adrpt= reply_pipe_adr;
      ret= stat(adrpt, &stbuf);
      if(ret == -1) {
+#if defined(__sortix__) && !defined(__SORTIX_HAS_MKNOD__)
+       ret= (errno = ENOSYS, -1);
+#else
        ret= mknod(adrpt, S_IFIFO | S_IRWXU | S_IRWXG | S_IRWXO | S_IRWXO,
                   (dev_t) 0);
+#endif
        if(ret == -1) {
           sprintf(xorriso->info_text,
                   "-launch_frontend: Cannot create named pipe %s",
