summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/posix/src')
-rw-r--r--xlators/storage/posix/src/Makefile.am2
-rw-r--r--xlators/storage/posix/src/posix-helpers.c1
-rw-r--r--xlators/storage/posix/src/posix.c10
3 files changed, 6 insertions, 7 deletions
diff --git a/xlators/storage/posix/src/Makefile.am b/xlators/storage/posix/src/Makefile.am
index d1d420017e7..408dcb80ddf 100644
--- a/xlators/storage/posix/src/Makefile.am
+++ b/xlators/storage/posix/src/Makefile.am
@@ -11,7 +11,7 @@ noinst_HEADERS = posix.h posix-mem-types.h posix-handle.h
AM_CFLAGS = -fPIC -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
-D$(GF_HOST_OS) -Wall -I$(top_srcdir)/libglusterfs/src -shared \
- -nostartfiles -I$(top_srcdir)/contrib/md5 -I$(top_srcdir)/rpc/xdr/src \
+ -nostartfiles -I$(top_srcdir)/rpc/xdr/src \
-I$(top_srcdir)/rpc/rpc-lib/src $(GF_CFLAGS)
CLEANFILES =
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 20a9528b09f..04c166c54f7 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -38,7 +38,6 @@
#endif /* GF_BSD_HOST_OS */
#include "glusterfs.h"
-#include "md5.h"
#include "checksum.h"
#include "dict.h"
#include "logging.h"
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index bf38bd6cebf..2452ddc4d88 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -24,6 +24,7 @@
#define __XOPEN_SOURCE 500
+#include <openssl/md5.h>
#include <stdint.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -42,7 +43,6 @@
#endif /* HAVE_LINKAT */
#include "glusterfs.h"
-#include "md5.h"
#include "checksum.h"
#include "dict.h"
#include "logging.h"
@@ -3739,13 +3739,13 @@ posix_rchecksum (call_frame_t *frame, xlator_t *this,
int ret = 0;
int32_t weak_checksum = 0;
- uint8_t strong_checksum[MD5_DIGEST_LEN];
+ unsigned char strong_checksum[MD5_DIGEST_LENGTH];
VALIDATE_OR_GOTO (frame, out);
VALIDATE_OR_GOTO (this, out);
VALIDATE_OR_GOTO (fd, out);
- memset (strong_checksum, 0, MD5_DIGEST_LEN);
+ memset (strong_checksum, 0, MD5_DIGEST_LENGTH);
buf = GF_CALLOC (1, len, gf_posix_mt_char);
if (!buf) {
@@ -3773,8 +3773,8 @@ posix_rchecksum (call_frame_t *frame, xlator_t *this,
goto out;
}
- weak_checksum = gf_rsync_weak_checksum (buf, len);
- gf_rsync_strong_checksum (buf, len, strong_checksum);
+ weak_checksum = gf_rsync_weak_checksum ((unsigned char *) buf, (size_t) len);
+ gf_rsync_strong_checksum ((unsigned char *) buf, (size_t) len, (unsigned char *) strong_checksum);
GF_FREE (buf);