Skip to content

Commit

Permalink
mdadm fix compilation for uClibc
Browse files Browse the repository at this point in the history
2008-12-08  Bernhard Reutner-Fischer  <[email protected]>

	* Makefile (dadm.uclibc): Remove misspelled and unneeded rule.
	* md5.h: Include stdint.h for uClibc.
	* mdadm.h: uClibc defines __UCLIBC__. If uClibc has LFS off
	then use lseek instead of lseek64.

Signed-off-by:  Bernhard Reutner-Fischer  <[email protected]>
  • Loading branch information
aldot authored and neilbrown committed Feb 1, 2009
1 parent 1a0ee0b commit 2df1f26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ mdadm.static : $(OBJS) $(STATICOBJS)
mdadm.tcc : $(SRCS) mdadm.h
$(TCC) -o mdadm.tcc $(SRCS)

dadm.uclibc : $(SRCS) mdadm.h
$(UCLIBC_GCC) -DUCLIBC -DHAVE_STDINT_H -o mdadm.uclibc $(SRCS) $(STATICSRC)

mdadm.klibc : $(SRCS) mdadm.h
rm -f $(OBJS)
gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32 $(CFLAGS) $(SRCS)
Expand Down
2 changes: 1 addition & 1 deletion md5.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_STDINT_H || _LIBC
#if HAVE_STDINT_H || _LIBC || defined __UCLIBC__
# include <stdint.h>
#endif

Expand Down
5 changes: 4 additions & 1 deletion mdadm.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,11 @@ struct stat64;
#define HAVE_NFTW we assume
#define HAVE_FTW

#ifdef UCLIBC
#ifdef __UCLIBC__
# include <features.h>
# ifndef __UCLIBC_HAS_LFS__
# define lseek64 lseek
# endif
# ifndef __UCLIBC_HAS_FTW__
# undef HAVE_FTW
# undef HAVE_NFTW
Expand Down

0 comments on commit 2df1f26

Please sign in to comment.