test-heimdal-20060217
[openafs.git] / src / aklog / aklog_main.c
index bbc8f39..c5add33 100644 (file)
@@ -10,6 +10,7 @@ static char *rcsid =
        "$Id$";
 #endif /* lint || SABER */
 
+#include <afsconfig.h>
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -70,7 +71,9 @@ u_long ntohl(u_long x)
 
 #else /* !WINDOWS */
 #include <afs/stds.h>
+#ifndef HAVE_KERBEROSV_HEIM_ERR_H
 #include <afs/com_err.h>
+#endif
 
 #include <afs/param.h>
 #ifdef AFS_SUN5_ENV
@@ -948,8 +951,8 @@ static char *next_path(char *origpath)
            ? elast_comp - last_comp : strlen(last_comp);
        strncat(pathtocheck, last_comp, len);
        memset(linkbuf, 0, sizeof(linkbuf));
-       if ((link = readlink(pathtocheck, linkbuf, 
-                                   sizeof(linkbuf))) > 0) {
+       if (link = (readlink(pathtocheck, linkbuf, 
+                                   sizeof(linkbuf)) > 0)) {
            if (++symlinkcount > MAXSYMLINKS) {
                fprintf(stderr, "%s: %s\n", progname, strerror(ELOOP));
                exit(AKLOG_BADPATH);