Sources would include glib-headers from within an extern-C scope. Since glib-headers contained templates, this would fail. Add a patch to move the header includes outside of the extern-C scope.