Ansi C patch using dlsym compiles OK under linux but fails on Mac Os X
问题 I have build a little patch to append to a certain application and trace the invocations of some functions. Among them, malloc() and open(). I am using dlsym to store the pointer to the original symbol and replace the function name with my own. It compiles -and works- perfectly under linux. Here's the code: #define _GNU_SOURCE #include <stdint.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include <dlfcn.h> /** * Interponemos nuestra funcion open * * @param char* filename *