Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
alert("NewArray", st->devname, NULL, ainfo);
}

if (st->utime == array.utime &&
if ((unsigned long)st->utime == array.utime &&
st->failed == array.failed_disks &&
st->working == array.working_disks &&
st->spare == array.spare_disks &&
Expand Down
9 changes: 9 additions & 0 deletions mdadm.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,20 @@ struct dlm_lksb {
* and there is no standard conversion function so... */
/* And dietlibc doesn't think byteswap is ok, so.. */
/* #include <byteswap.h> */

#ifndef bswap_16
#define bswap_16(x) (((x) & 0x00ffU) << 8 | \
((x) & 0xff00U) >> 8)
#endif

#ifndef bswap_32
#define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
((x) & 0xff000000U) >> 24 | \
((x) & 0x0000ff00U) << 8 | \
((x) & 0x00ff0000U) >> 8)
#endif

#ifndef bswap_64
#define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
((x) & 0xff00000000000000ULL) >> 56 | \
((x) & 0x000000000000ff00ULL) << 40 | \
Expand All @@ -153,6 +161,7 @@ struct dlm_lksb {
((x) & 0x0000ff0000000000ULL) >> 24 | \
((x) & 0x00000000ff000000ULL) << 8 | \
((x) & 0x000000ff00000000ULL) >> 8)
#endif

#if !defined(__KLIBC__)
#if BYTE_ORDER == LITTLE_ENDIAN
Expand Down
2 changes: 1 addition & 1 deletion util.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

#include "mdadm.h"
#include "md_p.h"
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <sys/un.h>
#include <sys/resource.h>
#include <sys/vfs.h>
#include <linux/magic.h>
#include <poll.h>
#include <ctype.h>
#include <dirent.h>
#include <signal.h>
Expand Down