The last error was caused by linux/capi.h being included, even though it wont compile (checked configure) This one I'm not sure about.
../../../tools/runtest -q -P wine -M gdi32.dll -T ../../.. -p gdi32_test.exe.so metafile.c && touch metafile.ok metafile.c:135: Test failed: pass 0: dx[0] (0) didn't match 6 metafile.c:135: Test failed: pass 0: dx[1] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[2] (0) didn't match 6 metafile.c:135: Test failed: pass 0: dx[3] (0) didn't match 5 metafile.c:135: Test failed: pass 0: dx[4] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[5] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[6] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[7] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[8] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[9] (0) didn't match 5 metafile.c:135: Test failed: pass 0: dx[10] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[11] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[12] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[13] (0) didn't match 5 metafile.c:135: Test failed: pass 0: dx[14] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[15] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[16] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[17] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[18] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[19] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[20] (0) didn't match 6 metafile.c:135: Test failed: pass 0: dx[21] (0) didn't match 5 metafile.c:135: Test failed: pass 0: dx[22] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[23] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[24] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[25] (0) didn't match 5 metafile.c:135: Test failed: pass 0: dx[26] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[27] (0) didn't match 6 metafile.c:135: Test failed: pass 0: dx[28] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[29] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[30] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[31] (0) didn't match 5 metafile.c:135: Test failed: pass 0: dx[32] (0) didn't match 5 metafile.c:135: Test failed: pass 0: dx[33] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[34] (0) didn't match 6 metafile.c:135: Test failed: pass 0: dx[35] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[36] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[37] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[38] (0) didn't match 3 metafile.c:135: Test failed: pass 0: dx[39] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[40] (0) didn't match 2 metafile.c:135: Test failed: pass 0: dx[41] (0) didn't match 4 metafile.c:135: Test failed: pass 0: dx[42] (0) didn't match 4 fixme:dc:GdiIsMetaPrintDC (nil) fixme:dc:GdiIsPlayMetafileDC (nil) fixme:dc:GdiIsMetaPrintDC 0x358 fixme:dc:GdiIsPlayMetafileDC 0x358 fixme:dc:GdiIsMetaPrintDC 0x368 fixme:dc:GdiIsPlayMetafileDC 0x368 make[3]: *** [metafile.ok] Error 43 make[3]: Leaving directory `/home/speeddy/wine/dlls/gdi/tests' make[2]: *** [tests/__test__] Error 2 make[2]: Leaving directory `/home/speeddy/wine/dlls/gdi' make[1]: *** [gdi/__test__] Error 2 make[1]: Leaving directory `/home/speeddy/wine/dlls' make: *** [dlls/__test__] Error 2