From: Neil Brown Date: Fri, 26 May 2006 04:28:33 +0000 (+0000) Subject: Make sure everything compiles... X-Git-Tag: mdadm-2.5~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1f1011b94caa3506c63fb3d1d1a99dd282c7bc5;p=thirdparty%2Fmdadm.git Make sure everything compiles... Signed-off-by: Neil Brown --- diff --git a/Assemble.c b/Assemble.c index c01a66f0..75da9a50 100644 --- a/Assemble.c +++ b/Assemble.c @@ -395,6 +395,7 @@ int Assemble(struct supertype *st, char *mddev, int mdfd, char *devname = tmpdev->devname; struct stat stb; /* looks like a good enough match to update the super block if needed */ +#ifndef MDASSEMBLE if (update) { int dfd; /* prepare useful information in info structures */ @@ -446,7 +447,9 @@ int Assemble(struct supertype *st, char *mddev, int mdfd, if (strcmp(update, "uuid")==0 && ident->bitmap_fd) bitmap_update_uuid(ident->bitmap_fd, info.uuid); - } else { + } else +#endif + { int dfd; dfd = dev_open(devname, O_RDWR|O_EXCL); diff --git a/Makefile b/Makefile index dd710fd0..4330dc4a 100644 --- a/Makefile +++ b/Makefile @@ -97,7 +97,7 @@ mdadm.tcc : $(SRCS) mdadm.h $(TCC) -o mdadm.tcc $(SRCS) mdadm.uclibc : $(SRCS) mdadm.h - $(UCLIBC_GCC) -DUCLIBC -o mdadm.uclibc $(SRCS) + $(UCLIBC_GCC) -DUCLIBC -DHAVE_STDINT_H -o mdadm.uclibc $(SRCS) SHA1.c sha1.c mdadm.klibc : $(SRCS) mdadm.h rm -f $(OBJS) @@ -108,15 +108,15 @@ test_stripe : restripe.c mdadm.h mdassemble : $(ASSEMBLE_SRCS) mdadm.h rm -f $(OBJS) - $(DIET_GCC) $(ASSEMBLE_FLAGS) -o mdassemble $(ASSEMBLE_SRCS) + $(DIET_GCC) $(ASSEMBLE_FLAGS) -o mdassemble $(ASSEMBLE_SRCS) SHA1.c sha1.c mdassemble.static : $(ASSEMBLE_SRCS) mdadm.h rm -f $(OBJS) - $(CC) $(LDFLAGS) $(ASSEMBLE_FLAGS) -static -o mdassemble.static $(ASSEMBLE_SRCS) + $(CC) $(LDFLAGS) $(ASSEMBLE_FLAGS) -static -DSTATIC -DHAVE_STDINT_H -o mdassemble.static $(ASSEMBLE_SRCS) SHA1.c sha1.c mdassemble.uclibc : $(ASSEMBLE_SRCS) mdadm.h - rm -f $(OBJS) - $(UCLIBC_GCC) $(ASSEMBLE_FLAGS) -DUCLIBC -static -o mdassemble.uclibc $(ASSEMBLE_SRCS) + rm -f $(OJS) + $(UCLIBC_GCC) $(ASSEMBLE_FLAGS) -DSTATIC -DUCLIBC -DHAVE_STDINT_H -static -o mdassemble.uclibc $(ASSEMBLE_SRCS) SHA1.c sha1.c # This doesn't work mdassemble.klibc : $(ASSEMBLE_SRCS) mdadm.h diff --git a/mdassemble.c b/mdassemble.c index 32e9e00d..23175480 100644 --- a/mdassemble.c +++ b/mdassemble.c @@ -98,6 +98,6 @@ int main() { rv |= Assemble(array_list->st, array_list->devname, mdfd, array_list, configfile, NULL, NULL, - readonly, runstop, NULL, verbose, force); + readonly, runstop, NULL, NULL, verbose, force); } } diff --git a/super0.c b/super0.c index 7bb64ebb..4d023004 100644 --- a/super0.c +++ b/super0.c @@ -28,7 +28,11 @@ */ #include "mdadm.h" +#ifndef UCLIBC #include /* for SHA1 */ +#else +extern unsigned char *SHA1(unsigned char *buf, int len, unsigned char *dest); +#endif /* * All handling for the 0.90.0 version superblock is in * this file.