]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Fix compilation with tinyc
authorNeil Brown <neilb@suse.de>
Tue, 14 Jun 2005 06:43:00 +0000 (06:43 +0000)
committerNeil Brown <neilb@suse.de>
Tue, 14 Jun 2005 06:43:00 +0000 (06:43 +0000)
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
ChangeLog
mdadm.h
util.c

index 0daf2181bc95177f529c8f98b6ab05c77a812f93..9fa9faa28b9e1edbaf806bdaee0cb89ea74e86d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@ Changes Prior to this release
     -   Allow --force with --grow so '-Gfn1' works (on raid1)
     -   Replace sprintf calls with snprintf (to quiet diet-libc)
     -   Add man page for mdassemble
+    -   Fix compilation with tinyc
        
 Changes Prior to 1.11.0 release
     -   Fix embarassing bug which causes --add to always fail.
diff --git a/mdadm.h b/mdadm.h
index bb124776069c9194eb9d0e36db1c8927b6a582de..1451c33c7014ff825da5f9ec6b02aab6db3bf75c 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -321,3 +321,14 @@ extern int open_mddev(char *dev, int autof);
 
 #define        ModeMask        0x1f
 #define        ModeShift       5
+
+
+#ifdef __TINYC__
+#undef minor
+#undef major
+#undef makedev
+#define minor(x) ((x)&0xff)
+#define major(x) (((x)>>8)&0xff)
+#define makedev(M,m) (((M)<<8) | (m))
+#endif
+
diff --git a/util.c b/util.c
index fab01929caf0d8bf461543fba518668b16360e47..8756d499e64d06b56233cabae726f04dd144329d 100644 (file)
--- a/util.c
+++ b/util.c
@@ -548,7 +548,6 @@ void put_md_name(char *name)
 
 
 
-
 struct superswitch *superlist[] = { &super0, &super1, NULL };
 
 struct supertype *super_by_version(int vers, int minor)
@@ -610,3 +609,9 @@ struct supertype *guess_super(int fd)
        free(st);
        return NULL;
 }
+
+#ifdef __TINYC__
+/* tinyc doesn't optimize this check in ioctl.h out ... */
+unsigned int __invalid_size_argument_for_IOC = 0;
+#endif
+