I "fixed" it this way: #ifndef AFS_OBSD_ENV #include <afs/com_err.h> #endif You could try adding darwin to my ifdef. I'm not happy with this solution but I don't have a better one right now.