--- openldap-2.4.21/libraries/liblutil/detach.c.old 2009-01-21 19:00:58.000000000 -0500 +++ openldap-2.4.21/libraries/liblutil/detach.c 2010-06-20 10:25:09.000000000 -0400 @@ -128,7 +128,7 @@ #ifdef HAVE_SETSID (void) setsid(); -#elif TIOCNOTTY +#elif defined(TIOCNOTTY) if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) { (void) ioctl( sd, TIOCNOTTY, NULL ); (void) close( sd );