I’m trying to compile the bsdmainutils
package in Debian that uses the /usr/include/login_cap.h
header (from libutil-freebsd-dev
), and I’m getting a bunch of errors like this:
/usr/include/login_cap.h:114:62: error: unknown type name ‘rlim_t’; did you mean ‘__rlim_t’? rlim_t login_getcapsize(login_cap_t *, const char *, rlim_t, rlim_t);
I’m using Debian testing. Is this a bug in login_cap.h
? I see rlim_t
defined in /usr/include/x86_64-linux-gnu/bits/resource.h
– can I just include that file within login_cap.h? If so, do I have to include the arch-dependent path or does GCC do something special and let me do like #include <sys/bits/resource.h>
?
Advertisement
Answer
Well, to partially answer my question, this issue is resolved by adding #include <sys/resource.h>
to login_cap.h
. So, maybe either login_cap.h
needs to come like this or bsdmainutils
needs to include sys/resource.h
.
I made a Debian bug report for this issue here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882728 but I don’t know if my solution is correct.