When -D_FORTIFY_SOURCE=2 preprocessor macro is used, compilation of Akai.cpp fails with an error: In function 'int open(const char*, int, ...)', inlined from 'bool DiskImage::WriteImage(const char*)' at Akai.cpp:1880:66: /usr/include/bits/fcntl2.h:50:26: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments __open_missing_mode (); (Full log here: http://pastebin.com/MwcvtnTr) With -D_FORTIFY_SOURCE=2 a call to open with the O_CREAT flag needs to specify a file permission mode as the third argument. Here's a patch that fixes this: http://pastebin.com/SeDpfakK AFAIK -D_FORTIFY_SOURCE=2 is in the default CPP_FLAGS of the package build system in many distributions, for example Arch Linux, so libgig should be compatible with it.
Fixed in SVN r2587. Thanks!