From: Tom I. H. <ti...@ha...> - 2019-01-20 18:24:54
|
I run MooseFS on NetBSD, and while the new mfsmetadirinfo is a nice addition, it doesn't compile cleanly for me out of the box. The reason is that NetBSD, like the other BSDs, has a humanize_number() already, so when you create your own function by that name, there's a collision. You haven't observed this on FreeBSD, because they want you to link with libutil, and #include <libutil.h> in your source code, to get access to this function. In NetBSD, it's in the standard C library, and stdlib.h. Our humanize_number() originated in NetBSD, but has been adopted by the other BSDs, and is also available on Linux, where you link with libbsd, and #include <bsd/stdlib.h>, to get access to it. It works exactly the same way on all these systems. I'm appending the change I've made locally - if you'd like to do something similar in the official distribution, to avoid maintaining your own humanize_number() in the future, you might apply this, or something like it, with the addition of #ifdef bits to add the right #include directives for your supported operating systems. Alternatively, if you'd rather keep your own implementation, consider this a polite request to change its name so it doesn't clash with the existing humanize_number() function... ;) My local modification: |