Blame patches/ngircd-26.1.local.patch

93e15c
diff -ru ngircd-26.1.orig/src/ngircd/ngircd.c ngircd-26.1/src/ngircd/ngircd.c
93e15c
--- ngircd-26.1.orig/src/ngircd/ngircd.c	2021-01-01 14:59:34.000000000 +0000
93e15c
+++ ngircd-26.1/src/ngircd/ngircd.c	2021-05-22 11:09:21.450145200 +0000
93e15c
@@ -574,7 +574,7 @@
93e15c
 {
93e15c
 	struct passwd *pwd;
93e15c
 
93e15c
-#ifdef __CYGWIN__
93e15c
+#if defined(__CYGWIN__) || defined(__midipix__)
93e15c
 	/* Cygwin kludge.
93e15c
 	 * It can return EINVAL instead of EPERM
93e15c
 	 * so, if we are already unprivileged,
93e15c
@@ -739,6 +739,7 @@
93e15c
 	}
93e15c
 #endif
93e15c
 
93e15c
+#ifndef __midipix__
93e15c
 	/* Change user ID */
93e15c
 	if (getuid() != Conf_UID) {
93e15c
 		if (setuid(Conf_UID) != 0) {
93e15c
@@ -751,6 +752,7 @@
93e15c
 				goto out;
93e15c
 		}
93e15c
 	}
93e15c
+#endif
93e15c
 
93e15c
 	initialized = true;
93e15c