mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
876 B

  1. This patch exists to avoid an infinite recursion in the fl_wrapper.
  2. fl_wrapper catches the _exit() call in the redefined malloc() and
  3. indirectly calls malloc() again... not ideal.
  4. --- cdrtools-2.01/conf/configure 2006-09-09 10:24:32.000000000 +0200
  5. +++ cdrtools-2.01/conf/configure 2006-09-09 09:33:07.000000000 +0200
  6. @@ -9362,27 +9362,24 @@
  7. #include "confdefs.h"
  8. static int mcalled;
  9. -char *
  10. +void *
  11. malloc(s)
  12. - int s;
  13. + size_t s;
  14. {
  15. - extern char *sbrk();
  16. -
  17. mcalled++;
  18. - _exit(0);
  19. - return (sbrk(s));
  20. + return calloc(1, s);
  21. }
  22. -free(p) char *p;{}
  23. -
  24. main()
  25. {
  26. #ifdef HAVE_STRDUP
  27. - strdup("aaa");
  28. + char * pc = strdup("aaa");
  29. + if (pc) free(pc);
  30. #else
  31. exit(0);
  32. #endif
  33. - exit(1);}
  34. + exit(mcalled == 0);
  35. +}
  36. EOF
  37. if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  38. then