[haiku-commits] Re: haiku: hrev51548 - src/system/libroot/posix/sys headers/posix/sys

  • From: kallisti5 <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 17 Nov 2017 12:34:27 -0600

On 2017-11-17 11:07, Jérôme Duval wrote:

2017-11-17 17:59 GMT+01:00 kallisti5 <kallisti5@xxxxxxxxxxx>:
Okey-dokey.
Here are my improvements without the private common function:

https://gist.github.com/kallisti5/dba206f90b3c670b94f997d804305edb

Is it alright to start using private kernel headers in libbsd?

No need to do a syscall in libbsd. It should be mostly like
http://cgit.haiku-os.org/haiku/tree/src/system/libroot/posix/sys/wait.cpp#n26
called from http://cgit.haiku-os.org/haiku/tree/src/libs/bsd/wait.c#n30

Done locally here.

https://gist.github.com/kallisti5/d615b29bac9b5a36e64069a4f7426637

It generates a warning. I'd expect that example code you gave generates a warning as well.

/home/kallisti5/Code/haiku/src/system/libroot/posix/sys/utimes.c:20:1: warning: no previous prototype for '_utimes' [-Wmissing-prototypes]
_utimes(const char* path, const struct timeval times[2], bool traverseLink)
 ^

 -- Alex

Other related posts: