#include <afs/pthread_glock.h>
#include <afs/afsutil.h>
#include <sys/types.h>
-#ifdef AFS_SUN5_ENV
-#include <fcntl.h>
-#endif
#ifdef AFS_NT40_ENV
#include <winsock2.h>
#include <fcntl.h>
#endif
#include <stdio.h>
#include <errno.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include "cellconfig.h"
#include "keys.h"