[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with libcap build

From: Sergey Bugaev
Subject: Re: Help with libcap build
Date: Sat, 25 Mar 2023 23:11:27 +0300

On Sat, Mar 25, 2023 at 10:56 PM Sahil Ahmed <ahmedsahil1406@gmail.com> wrote:
> Hi,
> I m trying to build libcap on debian/hurd and the error said no <sys/prctl.h> 
> found.


I think the issue lies quite a bit deeper than <sys/prctl.h> not being
present on a Debian/Hurd system ;) Namely, to my knowledge, Hurd
doesn't implement POSIX capabilities, at all. Here's [0] a wiki page
with some ideas about how they _could_ be implemented.


> I searched around and found that each operating system has different 
> implementation and names for system calls. So I tried to read what prctl.h 
> provided and found out that it provided operations on threads or process.

prctl is specific to Linux, you won't find a direct replacement on the
Hurd or other systems. Debian GNU/Hurd still ships the Linux prctl(2)
man page for some reason.

> I looked at the hurd manual to look for the threads library which pointed to 
> libthreads.

The Hurd is using pthread nowadays. There are a couple of Hurd- (or
rather, HTL-) specific extensions to that in pthread-np.h; other than
that, you can also look into using the lower-level Mach APIs for
manipulating tasks and threads.

> Am I missing something? Should I look into libhtreads and find a function 
> that is has a similar function and similar to prctl and replace it  in the 
> libcap file?

No, that won't help, because there are no POSIX capabilities on the
Hurd. What do you want libcap for anyway?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]