The gdatasetprivate.h header includes gatomic.h directly. It all works
well in GLib, but inside GObject it will trigger the single inclusion
guard.
Since this is a private header, and it's kind of a special case, one way
to fix it is to declare GLIB_COMPILATION around it and fool the single
inclusion guard in gatomic.h into thinking we're compiling GLib and not
GObject.
#include <string.h>
#include <signal.h>
+/* fool the single inclusion guard in gatomic.h, which is directly
+ * included by gdatasetprivate.h
+ */
+#define GLIB_COMPILATION
#include "glib/gdatasetprivate.h"
+#undef GLIB_COMPILATION
#include "gobject.h"
#include "gvaluecollector.h"