jayduhon / inferno-os

Automatically exported from code.google.com/p/inferno-os
2 stars 0 forks source link

Problem with compiling libbio on OSX 10.8 #298

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
step: sh makemk.sh
substep: gcc -c -I/Users/korvin/inferno/MacOSX/386/include 
-I/Users/korvin/inferno/include -I/Users/korvin/inferno/utils/include 
bbuffered.c bfildes.c bflush.c bgetc.c bgetd.c bgetrune.c binit.c boffset.c 
bprint.c bputc.c bputrune.c brdline.c brdstr.c bread.c bseek.c bvprint.c 
bwrite.c

Expected: mk binary built successfully!
See instead: bvprint.c:32:9: error: incompatible types when assigning to type 
«va_list» from type «struct __va_list_tag *»

OS: OSX 10.8

Changing

f.args = arg;
n = dofmt(&f, fmt);

in bvprint.c to

va_copy(f.args, arg);
n = dofmt(&f, fmt);
va_end(f.args);

fixes the problem, but I'm no sure is that a correct fix.

Original issue reported on code.google.com by andrey.s...@gmail.com on 25 Jun 2013 at 10:13

GoogleCodeExporter commented 9 years ago
I think that's right, but I've had to add an #ifdef because va_copy isn't 
defined in Plan 9.
Try the copy that I've just pushed to see if it works on OSX.

Original comment by Charles....@gmail.com on 25 Jun 2013 at 3:57

GoogleCodeExporter commented 9 years ago
It works, thanks.

Original comment by andrey.s...@gmail.com on 27 Jun 2013 at 6:34