Index: util-linux-2.12r/Makefile =================================================================== --- util-linux-2.12r.orig/Makefile +++ util-linux-2.12r/Makefile @@ -18,7 +18,8 @@ SUBDIRS=po \ fdisk \ hwclock \ sys-utils \ - text-utils + text-utils \ + partx .PHONEY: all install clean now all: defines.h @@ -43,7 +44,7 @@ install: clean: -rm -f *.o *~ omake conftest conftest.c core - @for subdir in $(SUBDIRS) partx; do \ + @for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done Index: util-linux-2.12r/partx/partx.c =================================================================== --- util-linux-2.12r.orig/partx/partx.c +++ util-linux-2.12r/partx/partx.c @@ -38,6 +38,8 @@ #include #include #include /* HDIO_GETGEO */ +/* workaround for __user in header file */ +#define __user #include #define BLKGETSIZE _IO(0x12,96) /* return device size */ @@ -333,29 +335,13 @@ xmalloc (size_t size) { /* * sseek: seek to specified sector */ -#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && !defined(__x86_64__) -#define NEED__llseek -#endif - -#ifdef NEED__llseek -#include /* _syscall */ -static -_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, - long long *, res, uint, wh); -#endif - static int sseek(int fd, unsigned int secnr) { long long in, out; in = ((long long) secnr << 9); out = 1; -#ifdef NEED__llseek - if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0 - || out != in) -#else if ((out = lseek(fd, in, SEEK_SET)) != in) -#endif { fprintf(stderr, "llseek error\n"); return -1; Index: util-linux-2.12r/partx/addpart.c =================================================================== --- util-linux-2.12r.orig/partx/addpart.c +++ util-linux-2.12r/partx/addpart.c @@ -3,6 +3,8 @@ #include #include #include +/* workaround for __user in header file */ +#define __user #include int Index: util-linux-2.12r/partx/delpart.c =================================================================== --- util-linux-2.12r.orig/partx/delpart.c +++ util-linux-2.12r/partx/delpart.c @@ -3,6 +3,8 @@ #include #include #include +/* workaround for __user in header file */ +#define __user #include int Index: util-linux-2.12r/partx/Makefile =================================================================== --- util-linux-2.12r.orig/partx/Makefile +++ util-linux-2.12r/partx/Makefile @@ -1,7 +1,12 @@ +include ../MCONFIG + OBJ = bsd.o dos.o partx.o solaris.o unixware.o gpt.o crc32.o CFLAGS += -Wall +SBIN= + +SBIN:=$(SBIN) partx -all: addpart delpart partx +all: addpart delpart $(SBIN) partx: $(OBJ) @@ -13,3 +18,7 @@ clean: rm -f $(OBJ) addpart.o delpart.o addpart delpart partx *~ $(OBJ): partx.h + +install: all + $(INSTALLDIR) $(SBINDIR) + $(INSTALLBIN) $(SBIN) $(SBINDIR)