Skip to content

Instantly share code, notes, and snippets.

@cyupa
Created October 15, 2014 08:35
Show Gist options
  • Save cyupa/5b5de63331fd05895c02 to your computer and use it in GitHub Desktop.
Save cyupa/5b5de63331fd05895c02 to your computer and use it in GitHub Desktop.
Snippet of code for missing fopen$UNIX2003 and fwrite$UNIX2003
// Add to AppDelegate.h
#ifdef DEBUG
FILE *fopen$UNIX2003(const char *filename, const char *mode);
size_t fwrite$UNIX2003(const void *ptr, size_t size, size_t nitems, FILE *stream);
#endif
// Add to AppDelegate.m
#ifdef DEBUG
FILE *fopen$UNIX2003(const char *filename, const char *mode) {
return fopen(filename, mode);
}
size_t fwrite$UNIX2003(const void *ptr, size_t size, size_t nitems, FILE *stream) {
return fwrite(ptr, size, nitems, stream);
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment