Index: tpm2-tss-4.1.3/src/tss2-tcti/tctildr-dl.c
===================================================================
--- tpm2-tss-4.1.3.orig/src/tss2-tcti/tctildr-dl.c
+++ tpm2-tss-4.1.3/src/tss2-tcti/tctildr-dl.c
@@ -15,6 +15,9 @@
 #include <dlfcn.h>
 #include <limits.h>
 #include <stdio.h>
+#ifndef PATH_MAX
+#define PATH_MAX 256
+#endif
 
 #include "tss2_tcti.h"
 #include "tctildr-interface.h"
Index: tpm2-tss-4.1.3/test/integration/policy-execute.int.c
===================================================================
--- tpm2-tss-4.1.3.orig/test/integration/policy-execute.int.c
+++ tpm2-tss-4.1.3/test/integration/policy-execute.int.c
@@ -26,6 +26,9 @@
 #if defined(__linux__)
 #include <linux/limits.h>
 #endif
+#ifndef PATH_MAX
+#define PATH_MAX 256
+#endif
 
 #include <openssl/ec.h>
 #include <openssl/evp.h>
Index: tpm2-tss-4.1.3/test/unit/tctildr.c
===================================================================
--- tpm2-tss-4.1.3.orig/test/unit/tctildr.c
+++ tpm2-tss-4.1.3/test/unit/tctildr.c
@@ -15,6 +15,9 @@
 
 #include <setjmp.h>
 #include <cmocka.h>
+#ifndef PATH_MAX
+#define PATH_MAX 256
+#endif
 
 #include "tss2_tctildr.h"
 #include "tss2_tcti.h"
Index: tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c
===================================================================
--- tpm2-tss-4.1.3.orig/src/tss2-tcti/tcti-cmd.c
+++ tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c
@@ -18,7 +18,7 @@
 
 #if defined (__FreeBSD__)
 #include <sys/procctl.h>
-#else
+#elif defined (__linux__)
 #include <sys/prctl.h>
 #endif
 #include <sys/types.h>
@@ -192,11 +192,16 @@ static int set_exit_with_parent (void)
     const int sig = SIGTERM;
     return procctl (P_PID, 0, PROC_PDEATHSIG_CTL, (void *)&sig);
 }
-#else
+#elif defined (__linux__)
 static int set_exit_with_parent (void)
 {
     return prctl (PR_SET_PDEATHSIG, SIGTERM);
 }
+#else
+static int set_exit_with_parent (void)
+{
+    return -1;
+}
 #endif
 
 static void __attribute__((__noreturn__))
Index: tpm2-tss-4.1.3/test/unit/tcti-cmd.c
===================================================================
--- tpm2-tss-4.1.3.orig/test/unit/tcti-cmd.c
+++ tpm2-tss-4.1.3/test/unit/tcti-cmd.c
@@ -20,7 +20,7 @@
 
 #if defined (__FreeBSD__)
 #include <sys/procctl.h>
-#else
+#elif defined (__linux__)
 #include <sys/prctl.h>
 #endif
 #include <sys/types.h>
Index: tpm2-tss-4.1.3/test/unit/tss2_policy.c
===================================================================
--- tpm2-tss-4.1.3.orig/test/unit/tss2_policy.c
+++ tpm2-tss-4.1.3/test/unit/tss2_policy.c
@@ -21,6 +21,9 @@
 #if defined(__linux__)
 #include <linux/limits.h>
 #endif
+#ifndef PATH_MAX
+#define PATH_MAX 256
+#endif
 
 #include "tss2_policy.h"
 
