]> arthur.barton.de Git - netatalk.git/commitdiff
Adjust gethostid check, from HAT.
authorfranklahm <franklahm>
Sun, 5 Apr 2009 07:22:06 +0000 (07:22 +0000)
committerfranklahm <franklahm>
Sun, 5 Apr 2009 07:22:06 +0000 (07:22 +0000)
configure.in
etc/afpd/status.c

index dde99636d7a3d88c9220d84c98fed6230bf3caf7..ec37454ca42da8b79f3cded38d206a86e6ac4435 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.213 2009-03-20 09:10:25 franklahm Exp $
+dnl $Id: configure.in,v 1.214 2009-04-05 07:22:06 franklahm Exp $
 dnl configure.in for netatalk
 
 AC_INIT(etc/afpd/main.c)
@@ -135,8 +135,7 @@ AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select s
 AC_CHECK_FUNCS(backtrace_symbols)
 AC_CHECK_FUNCS(setlocale nl_langinfo)
 AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
-AC_CHECK_FUNCS(strlcpy strlcat)
-AC_CHECK_FUNCS(setlinebuf)
+AC_CHECK_FUNCS(strlcpy strlcat setlinebuf gethostid)
 AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
 AC_CACHE_SAVE
 
index a95c7fe33e7895318eb415020fec6cae94d0325b..389fdba1d67f17fb6216821a1885746533df2d97 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: status.c,v 1.22 2009-02-16 14:03:30 franklahm Exp $
+ * $Id: status.c,v 1.23 2009-04-05 07:22:06 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -18,9 +18,9 @@
 
 #ifdef BSD4_4
 #include <sys/param.h>
-#ifndef USE_GETHOSTID
+#ifndef HAVE_GETHOSTID
 #include <sys/sysctl.h>
-#endif /* USE_GETHOSTID */
+#endif /* HAVE_GETHOSTID */
 #endif /* BSD4_4 */
 
 #include <netatalk/at.h>
@@ -194,14 +194,14 @@ static u_int16_t status_signature(char *data, int *servoffset, DSI *dsi,
     /* If signature type is a standard hostid... */
 server_signature_hostid:
     /* 16-byte signature consists of copies of the hostid */
-#if defined(BSD4_4) && defined(USE_GETHOSTID)
+#if defined(BSD4_4) && !defined(HAVE_GETHOSTID)
     mib[0] = CTL_KERN;
     mib[1] = KERN_HOSTID;
     len = sizeof(hostid);
     sysctl(mib, 2, &hostid, &len, NULL, 0);
-#else /* BSD4_4 && USE_GETHOSTID */
+#else /* BSD4_4 && !HAVE_GETHOSTID */
     hostid = gethostid();
-#endif /* BSD4_4 && USE_GETHOSTID */
+#endif /* BSD4_4 && !HAVE_GETHOSTID */
     if (!hostid) {
         if (dsi)
             hostid = dsi->server.sin_addr.s_addr;