diff -Paur --no-dereference -- libxkbcommon.upstream/config.sub libxkbcommon/config.sub
--- libxkbcommon.upstream/config.sub
+++ libxkbcommon/config.sub
@@ -1356,7 +1356,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 -- libxkbcommon.upstream/src/xkbcomp/include.c libxkbcommon/src/xkbcomp/include.c
--- libxkbcommon.upstream/src/xkbcomp/include.c
+++ libxkbcommon/src/xkbcomp/include.c
@@ -54,6 +54,10 @@
 #include "xkbcomp-priv.h"
 #include "include.h"
 
+#if defined(__sortix__) && !defined(PATH_MAX)
+#define PATH_MAX 32678
+#endif
+
 /**
  * Parse an include statement. Each call returns a file name, along with
  * (possibly) a specific map in the file, an explicit group designator, and
diff -Paur --no-dereference -- libxkbcommon.upstream/test/common.c libxkbcommon/test/common.c
--- libxkbcommon.upstream/test/common.c
+++ libxkbcommon/test/common.c
@@ -38,6 +38,10 @@
 
 #include "test.h"
 
+#if defined(__sortix__) && !defined(PATH_MAX)
+#define PATH_MAX 32678
+#endif
+
 /*
  * Test a sequence of keysyms, resulting from a sequence of key presses,
  * against the keysyms they're supposed to generate.
