URL: https://github.com/SSSD/sssd/pull/4 Title: #4: Added small tweaks to enable SSSD to be compiled with the musl libc
lslebodn commented: """ I checked header files on FreeBSD and gid_t is defined in `sys/types.h` as well. Could you check header sys/types.h in musl libc?
BTW `ALLPERMS` defined in `sys/stat.h` also on FreeBSD. But current fallback definition in `util.h` cannot cause any problem because `sys/stat.h` is included before your change.
It is true that the `MIN` macro in `sys/param.h` but I could not find it anywhere in a documentation/manual pages. We already have fallback definition of the macro in different file `src/util/safe-format-string.c`. I think we can include `sys/param.h` in `src/resolv/async_resolv.c` + `src/util/safe-format-string.c` and remove fallback definition of macro. BTW the `sys/param.h` is included in more files without any `#ifdef-s`
``` src/monitor/monitor.c:#include <sys/param.h> src/providers/ipa/ipa_access.c:#include <sys/param.h> src/providers/ipa/ipa_auth.c:#include <sys/param.h> src/providers/ldap/sdap_access.c:#include <sys/param.h> src/responder/ifp/ifpsrv_util.c:#include <sys/param.h> src/util/crypto/libcrypto/crypto_sha512crypt.c:#include <sys/param.h> src/util/crypto/nss/nss_sha512crypt.c:#include <sys/param.h> ```
"""
See the full comment at https://github.com/SSSD/sssd/pull/4#issuecomment-262951847
sssd-devel@lists.fedorahosted.org