Hi!
I am trying to make monit run with dietlibc right now. So far it runs
well without ssl. Some tweaking was necessary...
1) autoconf (and finally configure) generates a "#define malloc
rpl_malloc", because it is not a libc malloc. Dietlibc's malloc is
call malloc, thus it is undefined in monitor.h for dietlibc.
2) A handmade getloadavg is used for dietlibc.
3) All sprintf are replaced by snprintf also in foo+=sprintf(foo,...)
situations (=> foo+=snprintf(foo,STRLEN-(foo-buf),...).
4) There is a problem with <stropts.h>... so far is simply not
included in case dietlibc is used... but there is still a warning by
configure.
5) You still have to strip the binary, in order get a small result.
Results... (striped!)
(address@hidden) ~/compile/monit/monit> ldd monit
not a dynamic executable
Exit 1
(address@hidden) ~/compile/monit/monit> ls -la monit
-rwx--x--x 1 chopp chopp 207644 Aug 12 12:21 monit
(-: ... I would call it pretty small for a statically linked monit.
The binary dynamically linked to glibc is 180108 bytes large.
Still todo... (might be useful for other "normal" platforms)...
1) replacement of gethostbyname against gethostbyname_r because...
"warning: gethostbyname() leaks memory. Use gethostbyname_r instead!"
It is ready to be synced... if accepted!
CHopp