about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/ngircd.c6
-rw-r--r--src/portab/portab.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
index 50d91ce8..f016b6aa 100644
--- a/src/ngircd/ngircd.c
+++ b/src/ngircd/ngircd.c
@@ -567,6 +567,8 @@ Setup_FDStreams(int fd)
 } /* Setup_FDStreams */
 
 
+#if !defined(SINGLE_USER_OS)
+
 /**
  * Get user and group ID of unprivileged "nobody" user.
  *
@@ -606,6 +608,8 @@ NGIRCd_getNobodyID(uid_t *uid, gid_t *gid )
 	return true;
 } /* NGIRCd_getNobodyID */
 
+#endif
+
 
 static bool
 Random_Init_Kern(const char *file)
@@ -692,6 +696,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
 		}
 	}
 
+#if !defined(SINGLE_USER_OS)
 	/* Check user ID */
 	if (Conf_UID == 0) {
 		pwd = getpwuid(0);
@@ -718,6 +723,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
 				goto out;
 		}
 	}
+#endif
 
 	/* Change user ID */
 	if (getuid() != Conf_UID) {
diff --git a/src/portab/portab.h b/src/portab/portab.h
index 1c6e3f85..208d3500 100644
--- a/src/portab/portab.h
+++ b/src/portab/portab.h
@@ -112,7 +112,6 @@ typedef unsigned char bool;
 
 /* SPLint */
 
-
 #ifdef S_SPLINT_S
 #include "splint.h"
 #endif
@@ -132,6 +131,9 @@ typedef unsigned char bool;
 #define HOST_VENDOR "unknown"
 #endif
 
+#ifdef __HAIKU__
+#define SINGLE_USER_OS
+#endif
 
 /* configure options */