]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Make sure everything compiles...
authorNeil Brown <neilb@suse.de>
Fri, 26 May 2006 04:28:33 +0000 (04:28 +0000)
committerNeil Brown <neilb@suse.de>
Fri, 26 May 2006 04:28:33 +0000 (04:28 +0000)
Signed-off-by: Neil Brown <neilb@suse.de>
Assemble.c
Makefile
mdassemble.c
super0.c

index c01a66f0d3d29e2522ab1ccabb7a7da942d3a1a4..75da9a50dc641b7cab0492b2e5d88675d877451b 100644 (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);
 
index dd710fd05ebf9d509ca965be2db7180ff5418f69..4330dc4a68ae6e88b455dbd863cfd2ca3ac49ac5 100644 (file)
--- 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
index 32e9e00d53df5f30b110f1c9ff78a969440eceee..231754800112b6bfd5bce5c0e1803a0e700290f2 100644 (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);
                }
 }
index 7bb64ebbe92520d9943360f12a711352867819b5..4d0230049a860c9ef7c427a8ef37c39a550ff7d1 100644 (file)
--- a/super0.c
+++ b/super0.c
  */
 
 #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.