summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-05-26 04:28:33 +0000
committerNeil Brown <neilb@suse.de>2006-05-26 04:28:33 +0000
commitd1f1011b94caa3506c63fb3d1d1a99dd282c7bc5 (patch)
treee645ba960d16de44f60fa6fbe8aca489d98ec883
parent589395d69664377f7cce99f6b73e33e3ec417b52 (diff)
downloadmdadm-d1f1011b94caa3506c63fb3d1d1a99dd282c7bc5.tar.gz
mdadm-d1f1011b94caa3506c63fb3d1d1a99dd282c7bc5.tar.xz
mdadm-d1f1011b94caa3506c63fb3d1d1a99dd282c7bc5.zip
Make sure everything compiles...
Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r--Assemble.c5
-rw-r--r--Makefile10
-rw-r--r--mdassemble.c2
-rw-r--r--super0.c4
4 files changed, 14 insertions, 7 deletions
diff --git a/Assemble.c b/Assemble.c
index c01a66f..75da9a5 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 dd710fd..4330dc4 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 32e9e00..2317548 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 7bb64eb..4d02300 100644
--- a/super0.c
+++ b/super0.c
@@ -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.