aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/commands/commands.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/commands/commands.c b/lib/commands/commands.c
index 4a6272b9..41f5b7ef 100644
--- a/lib/commands/commands.c
+++ b/lib/commands/commands.c
@@ -12,7 +12,17 @@
#include <sys/param.h>
#include <sys/wait.h>
#include <unistd.h>
-#include <unistr.h>
+
+// This is a workaround fix for an issue on some systems that don't have `__GLIBC__` defined
+// and run into problems with <unistr.h>
+
+#ifndef __GLIBC__
+#define __GLIBC__ 2
+#include <unistr.h> // IWYU pragma: export
+#undef __GLIBC__
+#else
+#include <unistr.h> // IWYU pragma: export
+#endif
#define READ_END 0
#define WRITE_END 1