diff options
author | Neil Brown <neilb@suse.de> | 2005-06-14 06:43:00 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2005-06-14 06:43:00 +0000 |
commit | fe6729fa8cde33bce8d693e3f082fae688b1ff09 (patch) | |
tree | 610c3faeb9f95527fe5e95e2dbc157ba346151f8 | |
parent | ccf44f32725e5a86ba1ee78538df5f27b1de46eb (diff) | |
download | mdadm-fe6729fa8cde33bce8d693e3f082fae688b1ff09.tar.gz mdadm-fe6729fa8cde33bce8d693e3f082fae688b1ff09.tar.xz mdadm-fe6729fa8cde33bce8d693e3f082fae688b1ff09.zip |
Fix compilation with tinyc
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | mdadm.h | 11 | ||||
-rw-r--r-- | util.c | 7 |
3 files changed, 18 insertions, 1 deletions
@@ -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. @@ -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 + @@ -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 + |