ubik-warning-cleanup-20011005
[openafs.git] / src / ubik / ubikcmd.c
index 03a1a80..8a0c119 100644 (file)
@@ -7,8 +7,8 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include <afs/param.h>
 #include <afsconfig.h>
+#include <afs/param.h>
 
 RCSID("$Header$");
 
@@ -23,6 +23,13 @@ RCSID("$Header$");
 #endif
 #include <time.h>
 #include <lock.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <rx/xdr.h>
 #include <rx/rx.h>
 
@@ -48,7 +55,7 @@ ubik_ParseServerList(argc, argv, ahost, aothers)
     gethostname(hostname, sizeof(hostname));
     th = gethostbyname(hostname);
     if (!th) return UBADHOST;
-    bcopy(th->h_addr, &myHost, sizeof(afs_int32));
+    memcpy(&myHost, th->h_addr, sizeof(afs_int32));
     *ahost = myHost;
 
     inServer = 0;      /* haven't seen -servers yet */
@@ -66,7 +73,7 @@ ubik_ParseServerList(argc, argv, ahost, aothers)
                /* otherwise this is a new host name */
                th = gethostbyname(tp);
                if (!th) return UBADHOST;
-               bcopy(th->h_addr, &temp, sizeof(afs_int32));
+               memcpy(&temp, th->h_addr, sizeof(afs_int32));
                if (temp != myHost) {
                    if (counter++ >= MAXSERVERS) return UNHOSTS;
                    *aothers++ = temp;