When compiling latest openchange trunk code (r1565), The build failed. The error report says that "comparison_fn_t" is not defined in ndr.h On solaris, this type is not defined.
Created attachment 5029 [details] patch
an "ifdef __SOMEOPERATINGSYSTEM" should only be used in rare cases. A missing typedef is nothing os specific. In this case a configure test would be better and doing the typedef depending on the result of the configure test.
(In reply to comment #2) > an "ifdef __SOMEOPERATINGSYSTEM" should only be used in rare cases. A missing > typedef is nothing os specific. In this case a configure test would be better > and doing the typedef depending on the result of the configure test. > Yes, I agree. But the problem occurs in openchange instead of samba4 itself. i.e. the ndr.h is installed to the solaris but it contains a type comparison_fn_t which is not defined by the system. configure test has little help on this situation. Do you have a better solution?
We can avoid comparison_fn_t completely. enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, const void *key, uint32_t *v, int (*_cmp_fn)(const void *, const void *), bool _remove_tok);
(In reply to comment #4) > We can avoid comparison_fn_t completely. > > enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, > const void *key, uint32_t *v, > int (*_cmp_fn)(const void *, const void *), > bool _remove_tok); > Yes, I tested it. It works. Can we make such change in the trunk code? Thanks
Created attachment 5086 [details] patch based on comments
Thanks for your work, Brian!
Thanks! Fixed by a3b7e84a65e3ddc94edc36fd1b4641849b9ee0be in master