diff -aur zsh-5.0.0.org/configure.ac zsh-5.0.0/configure.ac
--- zsh-5.0.0.org/configure.ac	2012-06-21 20:36:03.034865152 +0200
+++ zsh-5.0.0/configure.ac	2012-11-04 20:38:45.770703360 +0100
@@ -796,8 +796,8 @@
   AC_CHECK_LIB(cap, cap_get_proc)
 fi
 
-AC_CHECK_LIB(socket, socket)
-AC_SEARCH_LIBS(gethostbyname2, bind)
+AC_SEARCH_LIBS(socket, socket network)
+AC_SEARCH_LIBS(gethostbyname2, bind network)
 
 case $LIBS in
   *-lbind*)
diff -aur zsh-5.0.0.org/Functions/Newuser/zsh-newuser-install zsh-5.0.0/Functions/Newuser/zsh-newuser-install
--- zsh-5.0.0.org/Functions/Newuser/zsh-newuser-install	2010-08-12 21:09:05.037224448 +0200
+++ zsh-5.0.0/Functions/Newuser/zsh-newuser-install	2012-11-04 20:37:13.598736896 +0100
@@ -10,14 +10,17 @@
 # How the function will be referred to.
 local myname=zsh-newuser-install
 
-# Quick test not requiring any setting up.
-# Don't run if we're root.  (These variables are provided by the shell.)
-if (( EUID == 0 || UID == 0 )); then
-  if [[ $1 = -f ]]; then
-    print -r "$myname: won't run as root.  Read the manual." >&2
-  fi
-  return 1
-fi
+# Haiku OS specific: We want to perform newuser configuration for 
+# zero UID too! ;-) So we have to disable it by patch.
+##
+## Quick test not requiring any setting up.
+## Don't run if we're root.  (These variables are provided by the shell.)
+#if (( EUID == 0 || UID == 0 )); then
+#  if [[ $1 = -f ]]; then
+#    print -r "$myname: won't run as root.  Read the manual." >&2
+#  fi
+#  return 1
+#fi
 
 # clear is missing in some Cygwin configurations (lacking ncurses)
 if ! ( clear >/dev/null 2>/dev/null ); then
diff -aur zsh-5.0.0.org/Src/prototypes.h zsh-5.0.0/Src/prototypes.h
--- zsh-5.0.0.org/Src/prototypes.h	2011-05-03 20:38:21.027000832 +0200
+++ zsh-5.0.0/Src/prototypes.h	2012-11-04 21:07:23.734789632 +0100
@@ -40,7 +40,7 @@
  * TBD: we'd much prefer to get hold of the header where
  * these are defined.
  */
-#ifdef _AIX
+#if defined(_AIX) || defined(__HAIKU__)
 #define TC_CONST const
 #else
 #define TC_CONST
