The rfc2440.c file is located in the ./mcrypt-2.6.6/src directory. Simply edit ./mcrypt-2.6.6/src/rfc2440.c using your favorite text editor (BBedit, vi, etc.) and change line 27 to:
#include <sys/malloc.h>
Once you have done this, you should be able to configure, make and make install successfully.
Good Luck!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wish I had checked this forum sooner because I have been getting the same error while trying to install mcrypt on OS X 10.4.10 and I've tried everything I could think of.
The only thing is, I'm not familiar with C and I'm not sure how to edit the rfc2440.c file properly.
mithma, could you explain how you went about editing the file to make mcrypt work? I assume the file needs to be compiled, this is primarily what I need help with.
Any word on when this issue will be fixed with mcrypt?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I built and installed libmcrypt-2.5.8 and mhash-0.9.9 successfully. I then configured mcrypt-2.6.6 using:
./configure --with-libmcrypt-prefix=/usr/local
Configure completes without error. I then run make and get the following errors:
gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../intl -g -O2 -I/usr/local/include -Wall -MT rfc2440.o -MD -MP -MF .deps/rfc2440.Tpo -c -o rfc2440.o rfc2440.c
rfc2440.c:27:20: error: malloc.h: No such file or directory
.
.
.
make[2]: *** [rfc2440.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
This is strange, since I have built and installed mcrypt-2.6.4 without incident.
It turns out that mcrypt-2.6.6 rfc2440.c includes malloc.h as:
#include <malloc.h>
In Mac OS X 10.4.10, malloc.h is in /usr/include/sys. So, the include line in rfc2440.c must be changed to:
#include <sys/malloc.h>
Now mcrypt-2.6.6 builds and installs cleanly.
I hope this is helpful to others.
The rfc2440.c file is located in the ./mcrypt-2.6.6/src directory. Simply edit ./mcrypt-2.6.6/src/rfc2440.c using your favorite text editor (BBedit, vi, etc.) and change line 27 to:
#include <sys/malloc.h>
Once you have done this, you should be able to configure, make and make install successfully.
Good Luck!
I wish I had checked this forum sooner because I have been getting the same error while trying to install mcrypt on OS X 10.4.10 and I've tried everything I could think of.
The only thing is, I'm not familiar with C and I'm not sure how to edit the rfc2440.c file properly.
mithma, could you explain how you went about editing the file to make mcrypt work? I assume the file needs to be compiled, this is primarily what I need help with.
Any word on when this issue will be fixed with mcrypt?