Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37956 - mac-fdisk doesn't compile on x86
Summary: mac-fdisk doesn't compile on x86
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-12 04:20 UTC by Jocelyn Mayer
Modified: 2004-03-11 03:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Mayer 2004-01-12 04:20:01 UTC
When trying to compile mac-fdisk on x86,
I get errors in fdisklabel.c:
gcc    -c -o fdisklabel.o fdisklabel.c
fdisklabel.c: In function `bselect':
fdisklabel.c:118: dereferencing pointer to incomplete type
... and numerous other for the same reason.


Reproducible: Always
Steps to Reproduce:
1. emerge -b --update mac-fdisk
2.
3.

Actual Results:  
Compilation error.

Expected Results:  
It should compile instead :-)


This patch fixes the problem:
diff -urNbB mac-fdisk-0.1.orig/fdisklabel.c mac-fdisk-0.1.new/fdisklabel.c
--- mac-fdisk-0.1.orig/fdisklabel.c     2004-01-12 13:20:54.083814816 +0100
+++ mac-fdisk-0.1.new/fdisklabel.c      2004-01-12 13:21:06.880869368 +0100
@@ -46,6 +46,11 @@
 #include <sys/ioctl.h>
 #include <sys/param.h>
 
+#include <linux/types.h>
+
+typedef unsigned short kdev_t; /* BAD hack; kdev_t is not exported */
+
+#include <linux/genhd.h>
 #include <linux/hdreg.h>
 #include <linux/fs.h>
Comment 1 Lars Weiler (RETIRED) gentoo-dev 2004-03-10 20:07:14 UTC
I'm not sure, if there would be any use of mac-fdisk on non ppc-archs...  Instead you have other tools like fdisk, cfdisk, parted...
Comment 2 Jocelyn Mayer 2004-03-11 03:03:06 UTC
I think you're wrong.
I have Macs and PCs and I really need to be able to share discs between them,
including MacOS disks, and I need to be able to use and edit them on PC.
So, I really need mac-fdisk working on i86.
I can see _no_ reason not to fix that stupid bug...