Make sure everything compiles...

Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
Neil Brown 2006-05-26 04:28:33 +00:00
parent 589395d696
commit d1f1011b94
4 changed files with 14 additions and 7 deletions

View File

@ -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);

View File

@ -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

View File

@ -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);
}
}

View File

@ -28,7 +28,11 @@
*/
#include "mdadm.h"
#ifndef UCLIBC
#include <openssl/sha.h> /* 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.