43 lines
2.5 KiB
Diff
43 lines
2.5 KiB
Diff
--- alsapid/lib.c.orig 2016-06-06 16:35:46.734195397 +0200
|
|
+++ alsapid/lib.c 2016-06-06 16:35:54.209195783 +0200
|
|
@@ -73,16 +73,29 @@
|
|
//static int (* real_snd_seq_create_port)(snd_seq_t * handle, snd_seq_port_info_t * info);
|
|
//static int (* real_snd_seq_create_simple_port)(snd_seq_t * seq, const char * name, unsigned int caps, unsigned int type);
|
|
|
|
-#define CHECK_FUNC(func) \
|
|
- if (real_ ## func == NULL) \
|
|
- { \
|
|
- real_ ## func = dlvsym(RTLD_NEXT, #func, API_VERSION); \
|
|
- if (real_ ## func == NULL) \
|
|
- { \
|
|
- fprintf(stderr, "dlvsym(\""#func"\", \""API_VERSION"\") failed. %s\n", dlerror()); \
|
|
- return -1; \
|
|
- } \
|
|
- }
|
|
+#if defined(__GLIBC__)
|
|
+ #define CHECK_FUNC(func) \
|
|
+ if (real_ ## func == NULL) \
|
|
+ { \
|
|
+ real_ ## func = dlvsym(RTLD_NEXT, #func, API_VERSION); \
|
|
+ if (real_ ## func == NULL) \
|
|
+ { \
|
|
+ fprintf(stderr, "dlvsym(\""#func"\", \""API_VERSION"\") failed. %s\n", dlerror()); \
|
|
+ return -1; \
|
|
+ } \
|
|
+ }
|
|
+#else
|
|
+ #define CHECK_FUNC(func) \
|
|
+ if (real_ ## func == NULL) \
|
|
+ { \
|
|
+ real_ ## func = dlsym(RTLD_NEXT, #func); \
|
|
+ if (real_ ## func == NULL) \
|
|
+ { \
|
|
+ fprintf(stderr, "dlsym(\""#func"\") failed. %s\n", dlerror()); \
|
|
+ return -1; \
|
|
+ } \
|
|
+ }
|
|
+#endif
|
|
|
|
#if 0
|
|
LADISH_PUBLIC
|