tjohansen14 / diskscrub

Automatically exported from code.google.com/p/diskscrub
GNU General Public License v2.0
0 stars 0 forks source link

build fails on Mac OS X 10.8 (Mountain Lion) #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. git clone https://code.google.com/p/diskscrub/
2. ./configure
3. make

What is the expected output? What do you see instead?

Make fails with this:

gcc -DHAVE_CONFIG_H -I. -I../config     -g -O2 -MT hwrand.o -MD -MP -MF 
.deps/hwrand.Tpo -c -o hwrand.o hwrand.c
In file included from hwrand.c:32:
util.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘blkalign’
make[1]: *** [hwrand.o] Error 1
make: *** [all-recursive] Error 1

What version of the product are you using? On what operating system?

10.8 with Xcode 4.5 with the command line tools installed.

Please provide any additional information below.

Here's the patch that fixes it:

diff --git a/src/hwrand.c b/src/hwrand.c
index fc33e01..e1d86f5 100644
--- a/src/hwrand.c
+++ b/src/hwrand.c
@@ -29,6 +29,7 @@
 #include <string.h>
 #include <errno.h>

+#include <sys/types.h>
 #include "util.h"
 #include "hwrand.h"

Original issue reported on code.google.com by shkam...@gmail.com on 30 Sep 2012 at 6:14

GoogleCodeExporter commented 8 years ago
All you have to do to fix this bug is to put this at the top of hwrand.c

#include <sys/types.h>

Then it will compile fine.  If your types.h include is in a different folder, 
please adjust accordingly.  The problem is very different that the error, so, 
it's rather misleading...

Damian Kohlfeld

Original comment by damiank...@gmail.com on 3 Oct 2013 at 8:21

GoogleCodeExporter commented 8 years ago
Well, that *WAS* in the patch I posted in the "Please provide any additional 
information below." section. . . 

The intention was not to ask how to fix it, the intention was to provide a fix 
to the code base. . .

Thank God Google sent me email to let me know how my efforts to help out 
maintainers by sending patches.  After a year, I'd completely forgotten about 
this.

Original comment by shkam...@gmail.com on 4 Oct 2013 at 6:48

GoogleCodeExporter commented 8 years ago
Even better, it looks like 
http://code.google.com/p/diskscrub/source/detail?r=67695cbf95fc172814a2e6879b4be
6c5afa9a20e&path=/src/hwrand.c was the commit to fix this issue, applied Oct 
12, 2012 (about two weeks after submitting this patch).

However, I can't close this issue.

Original comment by shkam...@gmail.com on 4 Oct 2013 at 6:54

GoogleCodeExporter commented 8 years ago

Original comment by garlick....@gmail.com on 19 Aug 2014 at 11:08