[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hurd-bug
Subject:    Re: Help with libcap build
From:       Sergey Bugaev <bugaevc () gmail ! com>
Date:       2023-03-25 20:11:27
Message-ID: CAN9u=HfuWhYBunMFRn_Z+PKzOWe7WTWdk+ydUvaCVzybeOZ3Cg () mail ! gmail ! com
[Download RAW message or body]

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.

Hello,

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.

[0]: https://www.gnu.org/software/hurd/community/gsoc/project_ideas/libcap/details.html


> 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?

Sergey


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic