Package: gpart
Version: 0.1h-11+b1
Severity: important
Tags: patch

The patches are based on 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=397632#15, with some changes 
made, to compile without errors 
(one of those patches did not suceed on this sytem).Most of the patch is for 
amd64 specific fix, except for the #include<errno.h> part
of the patch :). I have verified sucessful compilation on this machine.

Hope this helps,
Harish Badrinath

-- System Information:
Debian Release: 6.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64
Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gpart depends on:
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib

gpart recommends no packages.

gpart suggests no packages.

-- no debconf information
diff -Naurp gpart.orig/src/disku.c gpart-0.1h/src/disku.c
--- gpart.orig/src/disku.c	2001-02-07 19:04:07.000000000 +0000
+++ gpart-0.1h/src/disku.c	2011-03-27 14:42:54.000000000 +0000
@@ -22,6 +22,7 @@
 #include "gpart.h"
 
 #if defined(__linux__)
+#include <errno.h>
 #include <sys/mount.h>
 #include <linux/hdreg.h>
 #endif
diff -Naurp gpart.orig/src/gm_ntfs.h gpart-0.1h/src/gm_ntfs.h
--- gpart.orig/src/gm_ntfs.h	2001-01-29 20:33:58.000000000 +0000
+++ gpart-0.1h/src/gm_ntfs.h	2011-03-27 14:40:29.000000000 +0000
@@ -29,17 +29,16 @@
 /* 'NTFS' in little endian */
 #define NTFS_SUPER_MAGIC	0x5346544E
 
-#if defined(i386) || defined(__i386__) || defined(__alpha__)
+#include <stdint.h>
 
 /* unsigned integral types */
 #ifndef NTFS_INTEGRAL_TYPES
 #define NTFS_INTEGRAL_TYPES
-typedef unsigned char		ntfs_u8;
-typedef unsigned short		ntfs_u16;
-typedef unsigned int		ntfs_u32;
-typedef s64_t			ntfs_u64;
+typedef uint8_t		ntfs_u8;
+typedef uint16_t	ntfs_u16;
+typedef uint32_t	ntfs_u32;
+typedef uint64_t	ntfs_u64;
 #endif /* NTFS_INTEGRAL_TYPES */
-#endif /* defined(i386) || defined(__i386__) || defined(__alpha__) */
 
 
 /* Macros reading unsigned integers from a byte pointer */
@@ -53,8 +52,5 @@ typedef s64_t			ntfs_u64;
 /* Macros reading signed integers, returning int */
 #define NTFS_GETS8(p)		((int)(*(char*)(p)))
 #define NTFS_GETS16(p)		((int)(*(short*)(p)))
-#define NTFS_GETS24(p)		(NTFS_GETU24(p) < 0x800000 ? (int)NTFS_GETU24(p) :
-
-
 
 #endif /* _GM_NTFS_H */
diff -Naurp gpart.orig/src/gpart.h gpart-0.1h/src/gpart.h
--- gpart.orig/src/gpart.h	2001-01-30 23:07:29.000000000 +0000
+++ gpart-0.1h/src/gpart.h	2011-03-27 14:42:29.000000000 +0000
@@ -22,8 +22,9 @@
 
 #define PROGRAM		"gpart"
 
+#include <stdint.h>
 
-typedef unsigned char byte_t;
+typedef uint8_t byte_t;
 
 
 
@@ -31,7 +32,7 @@ typedef unsigned char byte_t;
  * endianness (incomplete, later)
  */
 
-#if defined(__i386__) || defined(__alpha__)
+#if defined(__i386__) || defined(__amd64__) || defined(__alpha__)
 #	define le16(x)	(x)		/* x as little endian */
 #	define be16(x)	((((x)&0xff00)>>8)			| \
 			(((x)&0x00ff)<<8))
@@ -112,8 +113,8 @@ typedef struct
 	byte_t		p_ehd;		/* end head */
 	byte_t		p_esect;	/* end sector */
 	byte_t		p_ecyl;		/* end cylinder */
-	unsigned long	p_start;	/* start sector (absolute) */
-	unsigned long	p_size;		/* # of sectors */
+	uint32_t	p_start;	/* start sector (absolute) */
+	uint32_t	p_size;		/* # of sectors */
 } dos_part_entry;
 
 
@@ -123,7 +124,7 @@ typedef struct dos_pt
 	byte_t		_align[2];
 	byte_t		t_boot[DOSPARTOFF];
 	dos_part_entry	t_parts[NDOSPARTS];
-	unsigned short	t_magic;	/* DOSPTMAGIC */
+	uint16_t	t_magic;	/* DOSPTMAGIC */
 } dos_part_table;
_______________________________________________
forensics-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/forensics-devel

Reply via email to