/* use ${compiler} weak.c `pkg-config --cflags glib-2.0` */ /* taken from pulseaudio src/pulse/gccmacro.h */ #ifndef PA_GCC_WEAKREF /** Macro for usgae of GCC's weakref attribute */ #define PA_GCC_WEAKREF(x) __attribute__((weakref(#x))); #endif #include /* below is extract from src/pulsecore/proplist-util.c */ #if defined(PA_GCC_WEAKREF) #include /* g_get_application_name comes from glib 2.0 */ static G_CONST_RETURN gchar* _g_get_application_name(void) PA_GCC_WEAKREF(g_get_application_name); #endif int main(void) { _g_get_application_name(); return 0; }