I just tried building git HEAD on NetBSD-current and gcc chokes on a prototype mismatch for popcountl:
util/hbitmap.c has: static inline int popcountl(unsigned long l) { return BITS_PER_LONG == 32 ? ctpop32(l) : ctpop64(l); } while NetBSD's strings.h uses: unsigned int popcountl(unsigned long) __constfunc; "unsigned" looks better to me for a non negative count, but maybe a configure test and using the system libs would be preferable? Martin